diff options
author | Nick Clifton <nickc@cygnus.com> | 1998-10-27 13:26:51 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 1998-10-27 13:26:51 +0000 |
commit | 844642e6edf5263a44532a9c863feee7cec72261 (patch) | |
tree | c8cad1ef016ba9b981950df693c16a7f48ee531a /gcc | |
parent | f5e04914fb476f5ea40a72b0cb675571347c953d (diff) | |
download | gcc-844642e6edf5263a44532a9c863feee7cec72261.zip gcc-844642e6edf5263a44532a9c863feee7cec72261.tar.gz gcc-844642e6edf5263a44532a9c863feee7cec72261.tar.bz2 |
Ignore empty target specific options...
Ignore empty target specific options, and if -W is also specified on the
command line then display undocumented options.
From-SVN: r23366
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/invoke.texi | 11 | ||||
-rw-r--r-- | gcc/toplev.c | 25 |
3 files changed, 37 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d664b98..21a25cc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ +Tue Oct 27 13:15:02 1998 Nick Clifton <nickc@cygnus.com> + + * toplev.c (display_help): Ignore empty target specific + options, and if -W is also specified on the command line then + display undocumented options. + Tue Oct 27 16:11:43 1998 David Edelsohn <edelsohn@mhpcc.edu> - + * collect2.c (aix64_flag): New variable. (main, case 'b'): Parse it. (GCC_CHECK_HDR): object magic number must match mode. diff --git a/gcc/invoke.texi b/gcc/invoke.texi index 3e6356a..162a1e6 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -87,7 +87,7 @@ in the following sections. @item Overall Options @xref{Overall Options,,Options Controlling the Kind of Output}. @smallexample --c -S -E -o @var{file} -pipe -v -x @var{language} +-c -S -E -o @var{file} -pipe -v --help -x @var{language} @end smallexample @item C Language Options @@ -558,6 +558,15 @@ Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler is unable to read from a pipe; but the GNU assembler has no trouble. + +@item --help +Print (on the standard output) a description of the command line options +understood by @code{gcc}. If the @code{-v} option is also specified +then @code{--help} will also be passed on to the various processes +invoked by @code{gcc}, so that they can display the command line options +they accept. If the @code{-W} option is also specified then command +line options which have no documentation associated with them will also +be displayed. @end table @node Invoking G++ diff --git a/gcc/toplev.c b/gcc/toplev.c index 203b40e..64ef43e 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); } |