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: unassig...@gcc.gnu.org
        ReportedBy: reich...@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

Reply via email to