re PR c++/51415 (Broken diagnostic: 'vec_init_expr' not supported by dump_expr)

PR c++/51415
	* error.c (dump_expr): Handle lambda closures specifically.

From-SVN: r184314
This commit is contained in:
Jason Merrill 2012-02-16 14:42:08 -05:00 committed by Jason Merrill
parent 525b3f60ff
commit 539b471b67
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-02-16 Jason Merrill <jason@redhat.com>
PR c++/51415
* error.c (dump_expr): Handle lambda closures specifically.
2012-02-14 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_explicit_instantiation): Give a warning

View File

@ -2189,6 +2189,8 @@ dump_expr (tree t, int flags)
}
}
}
if (TREE_TYPE (t) && LAMBDA_TYPE_P (TREE_TYPE (t)))
pp_string (cxx_pp, "<lambda closure object>");
if (TREE_TYPE (t) && EMPTY_CONSTRUCTOR_P (t))
{
dump_type (TREE_TYPE (t), 0);

View File

@ -1,3 +1,8 @@
2012-02-16 Jason Merrill <jason@redhat.com>
PR c++/51415
* g++.dg/cpp0x/lambda/lambda-err1.C: New.
2012-02-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/52255

View File

@ -0,0 +1,8 @@
// PR c++/51415
// { dg-do compile { target c++11 } }
void foo()
{
int x[1];
[x]{} = 0; // { dg-error "lambda closure" }
}