This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51412] New: [c++0x] Broken diagnostic with invalid lambda expressions
- 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: Sun, 04 Dec 2011 21:52:06 +0000
- Subject: [Bug c++/51412] New: [c++0x] Broken diagnostic with invalid lambda expressions
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51412
Bug #: 51412
Summary: [c++0x] Broken diagnostic with invalid lambda
expressions
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
A broken diagnostic is generated for the following invalid code snippet since
GCC 4.5.0:
==========================
void foo(int);
template<int> void bar()
{
foo([]{}...);
}
==========================
bug.cc: In function 'void bar()':
bug.cc:5:11: error: expansion pattern '#'lambda_expr' not supported by
dump_expr#<expression error>' contains no argument packs
A slightly modified testcase results in a similar diagnostic:
==========================
void foo(int);
template<int> void bar()
{
foo([]{}=0 ...);
}
==========================
bug.cc: In function 'void bar()':
bug.cc:5:14: error: expansion pattern '(#'lambda_expr' not supported by
pp_c_expression#)=0' contains no argument packs