PR c/71853
* c-parser.c (c_parser_switch_statement): Initialize ce.original_type
to error node for invalid code.
* gcc.dg/noncompile/pr71853.c: New test.
From-SVN: r238884
PR c/71742
* c-decl.c (finish_struct): Rephrase an error message.
+ PR c/71853
+ * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
+ to error node for invalid code.
+
2016-07-29 Jakub Jelinek <jakub@redhat.com>
PR c/71969
{
switch_cond_loc = UNKNOWN_LOCATION;
expr = error_mark_node;
+ ce.original_type = error_mark_node;
}
c_start_case (switch_loc, switch_cond_loc, expr, explicit_cast_p);
save_break = c_break_label;
* gcc.dg/c99-flex-array-1.c: Likewise.
* gcc.dg/c99-flex-array-typedef-1.c: Likewise.
+ PR c/71853
+ * gcc.dg/noncompile/pr71853.c: New test.
+
2016-07-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr59833.c: Use dg-add-options ieee.
--- /dev/null
+/* PR c/71853 */
+/* { dg-do compile } */
+
+void f (void)
+{
+ case (0) { /* { dg-error "expected" } */
+ switch 0: { } /* { dg-error "expected" } */
+ }
+}