PR c/65228
* c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
* gcc.dg/pr65228.c: New test.
From-SVN: r221056
+2015-02-27 Marek Polacek <polacek@redhat.com>
+
+ PR c/65228
+ * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
+
2015-02-14 Marek Polacek <polacek@redhat.com>
PR c/64768
decl = grokdeclarator (declarator, declspecs,
NORMAL, initialized, NULL, &attributes, &expr, NULL,
deprecated_state);
- if (!decl)
- return 0;
+ if (!decl || decl == error_mark_node)
+ return NULL_TREE;
if (expr)
add_stmt (fold_convert (void_type_node, expr));
+2015-02-27 Marek Polacek <polacek@redhat.com>
+
+ PR c/65228
+ * gcc.dg/pr65228.c: New test.
+
2015-02-27 Kai Tietz <ktietz@redhat.com>
PR c/35330
--- /dev/null
+/* PR c/65228 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+__auto_type a = b; /* { dg-error "undeclared" } */
+
+void
+f (void)
+{
+ __auto_type c = d; /* { dg-error "undeclared" } */
+}