This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21929] New: [4.0/4.1 regression] ICE on invalid template parameter
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2005 14:16:55 -0000
- Subject: [Bug c++/21929] New: [4.0/4.1 regression] ICE on invalid template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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