Commit f395f5e2 by Jason Merrill Committed by Jason Merrill

re PR c++/49598 ([C++0x] Ice on lambda with implicit capture by value.)

	PR c++/49598
	* semantics.c (finish_id_expression): convert_from_reference.

From-SVN: r175857
parent fce5dddd
2011-07-05 Jason Merrill <jason@redhat.com>
PR c++/49598
* semantics.c (finish_id_expression): convert_from_reference.
2011-07-05 Richard Guenther <rguenther@suse.de>
* decl.c (cxx_init_decl_processing): Defer building common
......
......@@ -2942,7 +2942,7 @@ finish_id_expression (tree id_expression,
tree containing_function = current_function_decl;
tree lambda_stack = NULL_TREE;
tree lambda_expr = NULL_TREE;
tree initializer = decl;
tree initializer = convert_from_reference (decl);
/* Core issue 696: "[At the July 2009 meeting] the CWG expressed
support for an approach in which a reference to a local
......
2011-07-05 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/lambda/lambda-ref2.C: New.
2011-07-05 Razya Ladelsky <razya@il.ibm.com>
PR tree-optimization/49580
......
// PR c++/49598
// { dg-options -std=c++0x }
// { dg-do run }
int
main()
{
int i = 10;
int& ir = i;
if ([=]{ return ir; }() != 10)
return 1;
}
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