From eb4a73b5a678cc790a9e0203d97db93838750f9c Mon Sep 17 00:00:00 2001 From: rms Date: Sat, 19 Jun 1993 22:34:05 +0000 Subject: (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 --- gcc/toplev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/toplev.c') 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; -- cgit v1.2.1