The following code is accepted by GCC without any error. It shows that if the last qualified name given is repeated any number of times then GCC ignores it.
GCC versions from v3.3.3 to v4.3.1 tested on Darwin and Linux platforms. namespace fred { class A { public: A() { } }; } int main() { fred::A a0; fred::A::A a1; fred::A::A::A a2; fred::A::A::A::A a3; return 0; } -- Summary: GCC accepts invalid namespace qualified name when last namespace is repeated Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gp dot bolton at computer dot org GCC build triplet: i386-apple-darwin9.2.2 GCC host triplet: i386-apple-darwin9.2.2 GCC target triplet: i386-apple-darwin9.2.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36501