PR c/71573
* c-decl.c (implicitly_declare): Return decl early not only for
error_mark_nodes, but for anything that is not a FUNCTION_DECL.
* gcc.dg/noncompile/pr71573.c: New test.
From-SVN: r238885
* c-parser.c (c_parser_switch_statement): Initialize ce.original_type
to error node for invalid code.
+ PR c/71573
+ * c-decl.c (implicitly_declare): Return decl early not only for
+ error_mark_nodes, but for anything that is not a FUNCTION_DECL.
+
2016-07-29 Jakub Jelinek <jakub@redhat.com>
PR c/71969
if (decl)
{
- if (decl == error_mark_node)
+ if (TREE_CODE (decl) != FUNCTION_DECL)
return decl;
/* FIXME: Objective-C has weird not-really-builtin functions
PR c/71853
* gcc.dg/noncompile/pr71853.c: New test.
+ PR c/71573
+ * gcc.dg/noncompile/pr71573.c: New test.
+
2016-07-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr59833.c: Use dg-add-options ieee.
--- /dev/null
+/* PR c/71573 */
+/* { dg-do compile } */
+
+void
+f1 (void)
+{
+ extern int t;
+}
+
+void
+f2 (void)
+{
+ t (0); /* { dg-error "called object .t. is not a function or function pointer" } */
+}