aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog4
-rw-r--r--gcc/c/c-decl.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index ec680d3..0650758 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -7,6 +7,10 @@
* 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
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 9a922cc..5f38985 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -3327,7 +3327,7 @@ implicitly_declare (location_t loc, tree functionid)
if (decl)
{
- if (decl == error_mark_node)
+ if (TREE_CODE (decl) != FUNCTION_DECL)
return decl;
/* FIXME: Objective-C has weird not-really-builtin functions