From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23973 invoked by alias); 28 Mar 2007 12:40:24 -0000 Received: (qmail 23912 invoked by alias); 28 Mar 2007 12:40:05 -0000 Date: Wed, 28 Mar 2007 12:40:00 -0000 Message-ID: <20070328124005.23911.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug driver/31355] --help= option isn't documented. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "nickc at redhat dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg02646.txt.bz2 ------- Comment #2 from nickc at redhat dot com 2007-03-28 13:40 ------- Subject: Re: --help= 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= 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 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