This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50400] New: compiler accepts invalid &X::Impl::Impl::Impl::.....::foo
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 Sep 2011 07:48:54 +0000
- Subject: [Bug c++/50400] New: compiler accepts invalid &X::Impl::Impl::Impl::.....::foo
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50400
Bug #: 50400
Summary: compiler accepts invalid
&X::Impl::Impl::Impl::.....::foo
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pluto@agmk.net
struct X { struct Impl; };
struct X::Impl {
Impl();
void foo();
};
X::Impl::Impl() {
void ( X::Impl::* ptr )() = &X::Impl::Impl::Impl::Impl::Impl::foo;
}
gcc-4.6-20110908 and clang++ accept this code while e.g. MSVC reports
an error: C3083: '{ctor}': the symbol to the left of a '::' must be a type