From: Richard Stallman Date: Sat, 19 Jun 1993 22:34:05 +0000 (+0000) Subject: (compile_file): For static decl never defined, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aaf44ca2f1bd06f4885682c1e6b0030e343641ad;p=gcc.git (compile_file): For static decl never defined, use just warning, not pedwarn. From-SVN: r4702 --- 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;