OSDN Git Service

(pushdecl): Check new declaration actually conflicts before warning
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Sep 1996 15:37:08 +0000 (15:37 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Sep 1996 15:37:08 +0000 (15:37 +0000)
about implicit external vs. static declarations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12772 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-decl.c

index cb59a08..039670e 100644 (file)
@@ -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)