This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12486] New: Accepts IMHO illegal C++ code


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 
} 
----------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]