c++ class private member access issue

Hello everybody,

    I found a c\+\+ test case like below compiles fine in clang but fails in g\+\+\. This is a test case extracted from g\+\+ test suite "gcc\-testsuite/src/g\+\+\.dg/parse/access3\.C"\. As per deja gnu comments seen in access3\.C compilation should fail\. Test case is shown below

class A {
private:
void f();
};
class B {
friend void A::f();
};

clang compilation "clang++ -c access3.C" produces no error

g++ compilation "g++ -c access3.C"
access3.C:9: error: ‘void A::f()’ is private
access3.C:13: error: within this context

I have checked this error on svn head version, checkout done on 14 May 2012. Is this a known issue?

Regards
Senthil Kumar

Yes, it's PR12328.

John.