------- 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  <[EMAIL PROTECTED]>

        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 [EMAIL PROTECTED]@r{[},@[EMAIL PROTECTED]
 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},
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] 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.
+
[EMAIL PROTECTED] @var{C}
[EMAIL PROTECTED] @var{C++}
[EMAIL PROTECTED] @var{Objc}
[EMAIL PROTECTED] @var{Fortran}
[EMAIL PROTECTED] @var{Ada}
[EMAIL PROTECTED] @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

Reply via email to