X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/f194182e6439c33ce17ef23241fc7742e6daeaf3..b28f239652670c58898c0a8b40ffb0eb05bf4558:/gnu/usr.bin/cc/common/toplev.c diff --git a/gnu/usr.bin/cc/common/toplev.c b/gnu/usr.bin/cc/common/toplev.c index a7db37c113..1e33806ee6 100644 --- a/gnu/usr.bin/cc/common/toplev.c +++ b/gnu/usr.bin/cc/common/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;