diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 2daff6f02e0..0ccceebf1ce 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1523,6 +1523,9 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr) { tree result = NULL_TREE; + if (error_operand_p (expr)) + return error_mark_node; + if (expr) { if (!processing_template_decl && !VOID_TYPE_P (TREE_TYPE (expr))) @@ -1993,7 +1996,8 @@ finish_compound_literal (tree type, tree initializer_list) implies that the array has two elements. */ if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type)) - complete_array_type (type, compound_literal, 1); + cp_complete_array_type (&TREE_TYPE (compound_literal), + compound_literal, 1); } return compound_literal; |