https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=13590 Last reconfirmed|2009-02-07 20:18:28 |2020-8-26 Blocks|65608 |94404 --- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #4) > Do we know how icc resolves the ambiguity? I assume it checks that the two lookup results for "S" actually name the same type, and so decides there's no ambiguity. I think that is correct according to [class.member.lookup]. The declaration sets for lookup of S in ::C and in ::B and in :S and in ::A<::S> all find the same type, ::S. So there is no ambiguity. This was ambiguous in C++03 but that was changed by CWG 39 http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#39 So GCC is wrong. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65608 [Bug 65608] [meta-bug] friend issues https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94404 [Bug 94404] [meta-bug] C++ core issues