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++/19964] New: [3.4/4.0 regression] ICE on invalid member declaration


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


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