For the following invalid code snippet I get an ICE since gcc 4.0.0:

====================================
template<int> struct A
{
    struct B;
};

template<> struct A<void>::B {};
====================================

bug.cc:6: error: type/value mismatch at argument 1 in template parameter list
for 'template<int <anonymous> > struct A'
bug.cc:6: error:   expected a constant of type 'int', got 'void'
bug.cc:6: internal compiler error: in cp_parser_diagnose_invalid_type_name, at
cp/parser.c:2103
Please submit a full bug report, [etc.]

-- 
           Summary: [4.0/4.1 regression] ICE on invalid template parameter
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, 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=21929

Reply via email to