aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 15b920a..b821871 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7560,6 +7560,9 @@ cp_parser_new_placement (cp_parser* parser)
/*allow_expansion_p=*/true,
/*non_constant_p=*/NULL));
+ if (expression_list && expression_list->is_empty ())
+ error ("expected expression-list or type-id");
+
return expression_list;
}