https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- EDG still accepts this, but Clang doesn't: 21146.cc:13:18: error: member 'S' found in multiple base classes of different types friend class A<S>; ^ 21146.cc:7:8: note: member found by ambiguous name lookup struct S {}; ^ 21146.cc:4:13: note: member found by ambiguous name lookup typedef T S; ^ 21146.cc:13:18: error: member 'S' found in multiple base classes of different types friend class A<S>; ^ 21146.cc:7:8: note: member found by ambiguous name lookup struct S {}; ^ 21146.cc:4:13: note: member found by ambiguous name lookup typedef T S; ^ 2 errors generated. I think GCC and Clang are right here.