The following invalid code snippet triggers an ICE on mainline:

======================
extern "Java"
{
  struct A
  {
    void foo(void;
  };
}
======================

bug.cc:5: error: expected `)' before ';' token
bug.cc:5: error: '<anonymous>' has incomplete type
bug.cc:5: error: invalid use of 'void'
bug.cc:5: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in acceptable_java_type, at cp/decl2.c:472
Please submit a full bug report, [etc.]


-- 
           Summary: [4.2 regression] ICE in acceptable_java_type
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to