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
This commit is contained in:
Nick Clifton 1998-10-27 13:26:51 +00:00 committed by Nick Clifton
parent f5e04914fb
commit 844642e6ed
3 changed files with 37 additions and 7 deletions

View File

@ -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.

View File

@ -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++

View File

@ -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);
}