------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-11-11 12:37 ------- Taking this bug. The code
void N::func(void) is rejected because the declaration friend void func(void); doesn't declare 'func' inside namespace 'N'. A separate declaration is necessary before the qualified ID form 'N::func' can be used. The following code, compiles under como, confirmed the above idea. namespace N { class A; } class N::A { void x(); friend void func(void); }; namespace N { void func(void); // declare func } void N::func(void) // after declaration // can now defined using qualified name { N::A a; a.x(); // access private function } int main() { return 0; } The bug will be fixed when problematic codes in libjava (it assumes friends are in '::') are corrected. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|nathan at gcc dot gnu dot |lerdsuwa at gcc dot gnu dot |org |org Status|SUSPENDED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3332