This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/31355] --help=<language> option isn't documented.
- From: "nickc at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2007 12:40:05 -0000
- Subject: [Bug driver/31355] --help=<language> option isn't documented.
- References: <bug-31355-13350@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from nickc at redhat dot com 2007-03-28 13:40 -------
Subject: Re: --help=<language> option isn't documented.
Hi Brooks,
The attached patch adds this missing documentation. It also takes
care of a small bug, whereby the name of the language whose options were
being displayed was not always included in the output of the
--help=<language> switch.
Unfortunately due to some problem with the bugzilla system I am
unable to upload the patch, so I have had to attach it to this email.
Cheers
Nick
gcc/ChangeLog
2007-03-28 Nick Clifton <nickc@redhat.com>
PR driver/31355
* doc/invoke.texi (--help=): Document that it accepts a language
name as a parameter.
Remove claim that --help=target does not behave in the same way as
--target-help with respect to the assembler and linker.
* opts.c (print_specific_help): If a language name has not been
selected then choose the first one.
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (revision 123290)
+++ gcc/doc/invoke.texi (working copy)
@@ -1100,8 +1100,9 @@ line options for each tool.
@item --help=@var{class}@r{[},@var{qualifier}@r{]}
Print (on the standard output) a description of the command line
options understood by the compiler that fit into a specific class.
-The class can be one of @var{optimizers}, @var{warnings}, @var{target}
-or @var{params}:
+The class can be one of @var{optimizers}, @var{warnings}, @var{target},
+@var{params} or a language name such as @var{C}, @var{C++} etc. The
+following table gives the meaning of the class names:
@table @gcctabopt
@item @var{optimizers}
@@ -1113,14 +1114,21 @@ This will display all of the options con
produced by the compiler.
@item @var{target}
-This will display target-specific options. Unlike the
-@option{--target-help} option however, target-specific options of the
-linker and assembler will not be displayed. This is because those
-tools do not currently support the extended @option{--help=} syntax.
+This will display target-specific options. This option is basically
+the same as @option{--target-help}.
@item @var{params}
This will display the values recognized by the @option{--param}
option.
+
+@item @var{C}
+@itemx @var{C++}
+@itemx @var{Objc}
+@itemx @var{Fortran}
+@itemx @var{Ada}
+@itemx @var{Treelang}
+This will display the options supported by the specified language
+front-end.
@end table
It is possible to further refine the output of the @option{--help=}
Index: gcc/opts.c
===================================================================
--- gcc/opts.c (revision 123290)
+++ gcc/opts.c (working copy)
@@ -893,7 +893,11 @@ print_specific_help (unsigned int includ
descrip_extra = lang_names [i];
}
else
- description = _("The following options are supported by, amoung
others, the language ");
+ {
+ description = _("The following options are supported by, amoung
others, the language ");
+ if (* descrip_extra == '\0')
+ descrip_extra = lang_names [i];
+ }
break;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31355