[Bug c++/12486] New: Accepts IMHO illegal C++ code
wwieser at gmx dot de
gcc-bugzilla@gcc.gnu.org
Wed Oct 1 22:48:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12486
Summary: Accepts IMHO illegal C++ code
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wwieser at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
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
}
----------------------------------
More information about the Gcc-bugs
mailing list