The following invalid code snippet triggers an ICE on mainline and 4.3 branch:
====================================== struct A { static const int i = 0/0 + ""; static const int j = int(i); }; ====================================== bug.cc:3: warning: division by zero in '0 / 0' bug.cc:3: error: invalid conversion from 'const char*' to 'int' bug.cc:3: error: 'A::i' cannot be initialized by a non-constant expression when being declared bug.cc:4: internal compiler error: in build_c_cast, at cp/typeck.c:5491 Please submit a full bug report, [etc.] -- Summary: [4.2/4.3 regression] ICE with invalid static const member Product: gcc Version: 4.3.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=29571