aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-11-16 02:25:57 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-11-15 21:25:57 -0500
commit1f288b3fa1f207302986f89f2d76fa66c1c72b2d (patch)
treec05a31ba64046ba9d080fdcbb5bceeab2244bfa0 /gcc
parent2c736c2fd58686978067a96af943958a477ecf3b (diff)
downloadgcc-1f288b3fa1f207302986f89f2d76fa66c1c72b2d.zip
gcc-1f288b3fa1f207302986f89f2d76fa66c1c72b2d.tar.gz
gcc-1f288b3fa1f207302986f89f2d76fa66c1c72b2d.tar.bz2
toplev.c (compile_file): Don't pedwarn about undefined static functions just because we passed -Wunused.
* toplev.c (compile_file): Don't pedwarn about undefined static functions just because we passed -Wunused. From-SVN: r23672
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/toplev.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 25d7e17..7a53064 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov 16 02:22:29 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * toplev.c (compile_file): Don't pedwarn about undefined static
+ functions just because we passed -Wunused.
+
Mon Nov 16 04:41:41 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* function.c (purge_addressof_1): Unshare rtl created by
@@ -1270,7 +1275,6 @@ Thu Oct 22 15:46:23 1998 Per Bothner (bothner@cygnus.com)
* Makefile.in (distdir-cvs, distdir-start): Clean up so it
works if "$(srcdir)" != ".".
->>>>>>> 1.2469
Wed Oct 21 19:23:59 1998 Jim Wilson <wilson@cygnus.com>
* expmed.c (store_bit_field): If need to add a SUBREG, then remove
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 2d0cea0..707da3e 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2966,8 +2966,12 @@ compile_file (name)
&& ! DECL_ARTIFICIAL (decl)
&& ! TREE_PUBLIC (decl))
{
- pedwarn_with_decl (decl,
- "`%s' declared `static' but never defined");
+ if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
+ pedwarn_with_decl (decl,
+ "`%s' used but never defined");
+ else
+ warning_with_decl (decl,
+ "`%s' declared `static' but never defined");
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
assemble_external (decl);