Commit 76186d20 by Jason Merrill Committed by Jason Merrill

re PR c++/48535 ([C++0x][SFINAE] Hard errors during list-value-initialization)

	PR c++/48535
	* semantics.c (finish_compound_literal): Handle references.

From-SVN: r172286
parent 834aa426
2011-04-11 Jason Merrill <jason@redhat.com>
PR c++/48535
* semantics.c (finish_compound_literal): Handle references.
PR c++/48535
* semantics.c (finish_compound_literal): Take complain parm.
(build_lambda_object): Adjust.
* cp-tree.h: Adjust.
......
......@@ -2315,6 +2315,14 @@ finish_compound_literal (tree type, tree compound_literal,
if (type == error_mark_node)
return error_mark_node;
if (TREE_CODE (type) == REFERENCE_TYPE)
{
compound_literal
= finish_compound_literal (TREE_TYPE (type), compound_literal,
complain);
return cp_build_c_cast (type, compound_literal, complain);
}
if (!TYPE_OBJ_P (type))
{
if (complain & tf_error)
......
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