aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-09-22 11:37:08 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-09-22 11:37:08 -0400
commitd20ae480d1dd1f099bf32fd7551b89373cbfca25 (patch)
treeb276e8f5e3a0fe0c62938a85093e4b17964e75a7 /gcc
parent2b01c3263e9ac407b5fbf43e0bff85c6fb6e97e8 (diff)
downloadgcc-d20ae480d1dd1f099bf32fd7551b89373cbfca25.zip
gcc-d20ae480d1dd1f099bf32fd7551b89373cbfca25.tar.gz
gcc-d20ae480d1dd1f099bf32fd7551b89373cbfca25.tar.bz2
(pushdecl): Check new declaration actually conflicts before warning about implicit external vs.
(pushdecl): Check new declaration actually conflicts before warning about implicit external vs. static declarations. From-SVN: r12772
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index cb59a08..039670e 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2007,6 +2007,7 @@ pushdecl (x)
/* Don't test for DECL_EXTERNAL, because grokdeclarator
sets this for all functions. */
&& ! TREE_PUBLIC (x)
+ && (TREE_CODE (x) == FUNCTION_DECL || b == global_binding_level)
/* We used to warn also for explicit extern followed by static,
but sometimes you need to do it that way. */
&& IDENTIFIER_IMPLICIT_DECL (name) != 0)