Commit 8c53f5e2 by Jason Merrill Committed by Jason Merrill

* semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.

From-SVN: r174881
parent 3d223145
2011-06-09 Jason Merrill <jason@redhat.com>
* semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.
2011-06-09 Paolo Carlini <paolo.carlini@oracle.com> 2011-06-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29003 PR c++/29003
......
...@@ -2387,6 +2387,8 @@ finish_compound_literal (tree type, tree compound_literal, ...@@ -2387,6 +2387,8 @@ finish_compound_literal (tree type, tree compound_literal,
return error_mark_node; return error_mark_node;
} }
compound_literal = digest_init (type, compound_literal, complain); compound_literal = digest_init (type, compound_literal, complain);
if (TREE_CODE (compound_literal) == CONSTRUCTOR)
TREE_HAS_CONSTRUCTOR (compound_literal) = true;
/* Put static/constant array temporaries in static variables, but always /* Put static/constant array temporaries in static variables, but always
represent class temporaries with TARGET_EXPR so we elide copies. */ represent class temporaries with TARGET_EXPR so we elide copies. */
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type)) if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
......
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