diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-06-19 22:34:05 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-06-19 22:34:05 +0000 |
commit | eb4a73b5a678cc790a9e0203d97db93838750f9c (patch) | |
tree | 09db4787bf7445a2a474f743dcfea0655f872500 /gcc/toplev.c | |
parent | e90830563d22e7ba8df193ed43a3abe88376980b (diff) | |
download | gcc-eb4a73b5a678cc790a9e0203d97db93838750f9c.tar.gz |
(compile_file): For static decl never defined,
use just warning, not pedwarn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index a7db37c1132..1e33806ee63 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1939,7 +1939,11 @@ compile_file (name) && DECL_EXTERNAL (decl) && ! TREE_PUBLIC (decl)) { - pedwarn_with_decl (decl, + /* This should be a pedwarn, except that there is + no easy way to prevent it from happening when the + name is used only inside a sizeof. + This at least avoids being incorrect. */ + warning_with_decl (decl, "`%s' declared `static' but never defined"); /* This symbol is effectively an "extern" declaration now. */ TREE_PUBLIC (decl) = 1; |