[Bug c++/19964] New: [3.4/4.0 regression] ICE on invalid member declaration

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 15 09:30:00 GMT 2005


The following invalid code snippet causes an ICE since gcc 3.4.0:

==================
struct A
{
    A : A;
};
==================

bug.cc:3: error: expected primary-expression before ';' token
bug.cc:3: error: name 'A' has incomplete type
bug.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

With the similar code snippet

==================
struct A
{
    A : B;
};
==================

I get an ICE since at least gcc 2.95.3.

bug.cc:3: error: 'B' was not declared in this scope
bug.cc:3: error: name 'A' has incomplete type
bug.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

-- 
           Summary: [3.4/4.0 regression] ICE on invalid member declaration
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19964



More information about the Gcc-bugs mailing list