http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60860
Bug ID: 60860 Summary: Friend function declaration incorrectly hides function in outer namespace Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dibeas at ieee dot org The following valid code fails to compile: void f( int ); namespace N { struct A { friend void f(int); friend void f(double); }; void g() { f(0); } } The problem goes away if any of the two friend declarations is commented out.