This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50400] compiler accepts invalid &X::Impl::Impl::Impl::.....::foo
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 Sep 2011 09:34:52 +0000
- Subject: [Bug c++/50400] compiler accepts invalid &X::Impl::Impl::Impl::.....::foo
- Auto-submitted: auto-generated
- References: <bug-50400-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50400
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-15 09:34:52 UTC ---
EDG accepts it too, are you suggesting MSVC is right and all the others wrong?
That would be a first ;)
See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#318
Because the constructor Impl::Impl is not an acceptable lookup result in the
expression X::Impl::Impl::foo the second "Impl" names the class itself, and so
the code is valid and G++ is correct