http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59295
Bug ID: 59295 Summary: useless warning: 'Bar' is already a friend of 'Foo' [enabled by default] Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppluzhnikov at google dot com Google ref: b/11542609 Using trunk gcc: g++ (GCC) 4.9.0 20131125 (experimental) /// -- cut --- class Foo { friend class Bar; friend class Bar; }; /// -- cut --- g++ -c t.cc t.cc:3:15: warning: 'Bar' is already a friend of 'Foo' [enabled by default] friend class Bar; ^ This warning is purely stylistic -- no possible bug could happen when this warning is disabled. It is also not suppressable :-( In actual code, both friend declarations come from macro expansion, and are somewhat hard to get rid of.