This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51422] New: [c++0x] ICE with invalid lambda expression
- 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: Mon, 05 Dec 2011 07:56:26 +0000
- Subject: [Bug c++/51422] New: [c++0x] ICE with invalid lambda expression
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51422
Bug #: 51422
Summary: [c++0x] ICE with invalid lambda expression
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 on trunk:
===================================
template<typename> struct A {};
void foo()
{
[i] { A<decltype(i)>(); };
[i] { A<decltype(i)>(); };
}
===================================
bug.cc: In function 'void foo()':
bug.cc:5:4: error: 'i' was not declared in this scope
bug.cc: In lambda function:
bug.cc:5:22: error: template argument 1 is invalid
bug.cc: In lambda function:
bug.cc:6:20: internal compiler error: in is_normal_capture_proxy, at
cp/semantics.c:8797
Please submit a full bug report, [etc.]