This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12486] New: Accepts IMHO illegal C++ code
- From: "wwieser at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2003 22:48:21 -0000
- Subject: [Bug c++/12486] New: Accepts IMHO illegal C++ code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
}
----------------------------------