PR c/71583
* c-parser.c (c_parser_postfix_expression_after_paren_type): Also
check expr.value.
* gcc.dg/noncompile/pr71583.c: New test.
From-SVN: r238861
+2016-07-29 Marek Polacek <polacek@redhat.com>
+
+ PR c/71583
+ * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
+ check expr.value.
+
2016-07-22 Uros Bizjak <ubizjak@gmail.com>
* c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
set_c_expr_source_range (&expr, init.src_range);
expr.original_code = ERROR_MARK;
expr.original_type = NULL;
- if (type != error_mark_node && type_expr)
+ if (type != error_mark_node
+ && expr.value != error_mark_node
+ && type_expr)
{
if (TREE_CODE (expr.value) == C_MAYBE_CONST_EXPR)
{
PR c/71574
* c-c++-common/pr71574.c: New test.
+ PR c/71583
+ * gcc.dg/noncompile/pr71583.c: New test.
+
2016-07-29 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/68217
--- /dev/null
+/* PR c/71583 */
+/* { dg-do compile } */
+
+void
+f (int i)
+{
+ (int (*)[++i]) { int }; /* { dg-error "expected" } */
+ (int (*)[++i]) { }; /* { dg-error "empty" } */
+ (int (*)[++i]) { , }; /* { dg-error "expected" } */
+ (int (*)[++i]) { f () }; /* { dg-error "too few" } */
+}