12486 – [3.3/3.4 Regression] Accepts IMHO invalid C++ code (original) (raw)

Description wwieser 2003-10-01 22:48:19 UTC

Affected: gcc (GCC) 3.3.2 20031001 (prerelease) gcc (GCC) 3.4 20031001 (experimental) probably more The following code seems illegal as of my feeling for C++.
However, it compiles without error.
-----------<gccbug.cc>------------ struct A { int ma; }; struct B { }; void foo() { B *b; b->A::ma=0; // OOPS: A not a base of B }