(pushdecl): Check new declaration actually conflicts before warning about implicit...
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 22 Sep 1996 15:37:08 +0000 (11:37 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 22 Sep 1996 15:37:08 +0000 (11:37 -0400)
(pushdecl): Check new declaration actually conflicts before warning
about implicit external vs. static declarations.

From-SVN: r12772

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)