Commit 539b471b by Jason Merrill Committed by Jason Merrill

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
parent 525b3f60
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
......
......@@ -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);
......
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
......
// PR c++/51415
// { dg-do compile { target c++11 } }
void foo()
{
int x[1];
[x]{} = 0; // { dg-error "lambda closure" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment