diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-27 13:26:51 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-27 13:26:51 +0000 |
commit | e045701e493a4b7ea7833947768df7d9808a3902 (patch) | |
tree | c8cad1ef016ba9b981950df693c16a7f48ee531a /gcc/toplev.c | |
parent | 9ae139a22bb69a6debf5e705d44bc2d0bff05a23 (diff) | |
download | gcc-e045701e493a4b7ea7833947768df7d9808a3902.tar.gz |
Ignore empty target specific options, and if -W is also specified on the
command line then display undocumented options.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 203b40e6d2f..64ef43e4301 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -4079,7 +4079,12 @@ display_help () char * option = documented_lang_options[i].option; if (description == NULL) - undoc = 1; + { + undoc = 1; + + if (extra_warnings) + printf (" %-23.23s [undocumented]\n", option); + } else if (* description == 0) continue; else if (option == NULL) @@ -4119,10 +4124,15 @@ display_help () char * option = target_switches[i].name; char * description = target_switches[i].description; - if (option == NULL) + if (option == NULL || * option == 0) continue; else if (description == NULL) - undoc = 1; + { + undoc = 1; + + if (extra_warnings) + printf (" -m%-21.21s [undocumented]\n", option); + } else if (* description != 0) doc += printf (" -m%-21.21s %s\n", option, description); } @@ -4133,10 +4143,15 @@ display_help () char * option = target_options[i].prefix; char * description = target_options[i].description; - if (option == NULL) + if (option == NULL || * option == 0) continue; else if (description == NULL) - undoc = 1; + { + undoc = 1; + + if (extra_warnings) + printf (" -m%-21.21s [undocumented]\n", option); + } else if (* description != 0) doc += printf (" -m%-21.21s %s\n", option, description); } |