Commit 02673c66 by Richard Biener Committed by Richard Biener

decl.c (grokdeclarator): Properly insert a DECL_EXPR for anonymous VLAs.

2016-05-02  Richard Biener  <rguenther@suse.de>

	cp/
	* decl.c (grokdeclarator): Properly insert a DECL_EXPR for
	anonymous VLAs.

From-SVN: r235706
parent c83e6ebf
2016-05-02 Richard Biener <rguenther@suse.de>
* decl.c (grokdeclarator): Properly insert a DECL_EXPR for
anonymous VLAs.
2016-04-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/66644
......
......@@ -10393,8 +10393,11 @@ grokdeclarator (const cp_declarator *declarator,
&& (decl_context == NORMAL || decl_context == FIELD)
&& at_function_scope_p ()
&& variably_modified_type_p (type, NULL_TREE))
/* Force evaluation of the SAVE_EXPR. */
finish_expr_stmt (TYPE_SIZE (type));
{
TYPE_NAME (type) = build_decl (UNKNOWN_LOCATION, TYPE_DECL,
NULL_TREE, type);
add_decl_expr (TYPE_NAME (type));
}
if (declarator->kind == cdk_reference)
{
......
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