This code is valid, but rejected by GCC: struct A { void f(); }; typedef void F(); struct B { friend F A::f; };
// error: type 'A' is not derived from type 'B' -- Summary: GCC does not accept friend function declarations using a typedef for function type. Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: schaub-johannes at web dot de GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44402