below is an example in standard N2960. struct A { A(); }; struct B : public A { B(); }; A::A() { } B::B() { } A::A a; int main() { return 0; } According to the standard [class.qual]/2, 'A::A a;' is error because A::A is not a type name. But g++ can compile it without error or warning.
*** This bug has been marked as a duplicate of 11764 ***