A recent change on CVS HEAD breaks this: $ cat a.cc class X { friend class Y; friend int foo(const Y&); }; $ g++ -c -W -Wall a.cc a.cc:3: error: expected ',' or '...' before '&' token a.cc:3: error: ISO C++ forbids declaration of 'Y' with no type
The original bug report is against CLN with possibly more info of value, and may be read here: http://thep.physik.uni-mainz.de/pipermail/cln-list/2005-April/000119.html AFAIK gcc-4.0.0 is fine. -- Summary: friend inaccessibility Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Ralf dot Wildenhues at gmx dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21092