This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28347] New: [4.1/4.2 regression] ICE on typedef with initialization
- 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: 11 Jul 2006 16:17:41 -0000
- Subject: [Bug c++/28347] New: [4.1/4.2 regression] ICE on typedef with initialization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE on mainline and the 4.1
branch (introduced after GCC 4.1.1):
=========================================
template<int> void foo()
{
typedef int i = 0;
}
=========================================
bug.cc: In function 'void foo()':
bug.cc:3: error: typedef 'i' is initialized (use __typeof__ instead)
bug.cc:3: internal compiler error: tree check: expected var_decl, have
type_decl in cp_finish_decl, at cp/decl.c:5080
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2 regression] ICE on typedef with initialization
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=28347