diff options
author | Geoffrey Keating <geoffk@apple.com> | 2004-06-03 23:16:21 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2004-06-03 23:16:21 +0000 |
commit | 3d98fa14024bb2aee26f91fe7a6256fc089594fb (patch) | |
tree | 4554f641ff49cc3f69a4067621345e47d149e998 /gcc/toplev.c | |
parent | 0524c91d1eee6dc2f1629160ed309a5441fb3bdd (diff) | |
download | gcc-3d98fa14024bb2aee26f91fe7a6256fc089594fb.zip gcc-3d98fa14024bb2aee26f91fe7a6256fc089594fb.tar.gz gcc-3d98fa14024bb2aee26f91fe7a6256fc089594fb.tar.bz2 |
toplev.c (check_global_declarations): Don't ask for DECL_ASSEMBLER_NAME unless the function really is declared static...
* toplev.c (check_global_declarations): Don't ask for
DECL_ASSEMBLER_NAME unless the function really is declared
static and not defined.
From-SVN: r82611
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 27f299b..afbdb5c 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1516,12 +1516,12 @@ check_global_declarations (tree *vec, int len) because many programs have static variables that exist only to get some text into the object file. */ if (TREE_CODE (decl) == FUNCTION_DECL - && (warn_unused_function - || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) && DECL_INITIAL (decl) == 0 && DECL_EXTERNAL (decl) && ! DECL_ARTIFICIAL (decl) - && ! TREE_PUBLIC (decl)) + && ! TREE_PUBLIC (decl) + && (warn_unused_function + || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) { if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) pedwarn ("%J'%F' used but never defined", decl, decl); |