This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28420] New: [4.0/4.1/4.2 regression] ICE with "typeid" as 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: 18 Jul 2006 10:42:47 -0000
- Subject: [Bug c++/28420] New: [4.0/4.1/4.2 regression] ICE with "typeid" as template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE since GCC 4.0.0:
========================================
template<int> struct A;
int i = sizeof(A<typeid>);
========================================
bug.cc:3: error: `typeid' operator cannot appear in a constant-expression
bug.cc:3: error: template argument 1 is invalid
*** glibc detected *** double free or corruption (out): 0x00000000009e51c0 ***
bug.cc:3: internal compiler error: Aborted
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1/4.2 regression] ICE with "typeid" as template
parameter
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=28420