This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51464] New: [c++0x] ICE with invalid use of []
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Dec 2011 08:20:12 +0000
- Subject: [Bug c++/51464] New: [c++0x] ICE with invalid use of []
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51464
Bug #: 51464
Summary: [c++0x] ICE with invalid use of []
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following invalid code snippet triggers an ICE since GCC 4.5.0:
===========================================
template<int = sizeof([])> struct A {};
===========================================
bug.cc:1:23: error: lambda-expression in unevaluated context
bug.cc:1:24: error: definition of 'struct<lambda>' inside template parameter
list
bug.cc:1:24: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in begin_lambda_type, at cp/semantics.c:8609
Please submit a full bug report, [etc.]