------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-24 17:27 ------- (In reply to comment #9) > I see. Then I'm looking forward to 4.1 :-) > > One last thing: is it a bug that the behaviour differs for named namespace in > my second example?
You second example is about equivant to before GCC fixes the friend bug for declaring the class in the namespace: struct S1 { S1(); }; namespace { struct S1; struct S2 { friend struct S1; }; } S1::S1() { } So S1 ambiguous in the global namespace. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21181