------- Comment #8 from manu at gcc dot gnu dot org  2008-01-22 07:51 -------
Can't  we get this fixed soon? It is marked as a P2 regression.

(In reply to comment #7)
> Subject: Re:  [4.3 Regression] gcc -v --help returns no options

> You can find out all the options supported by a given language, 
> including the ones that it shares with other languages and including 
> those that do not have a description by using the --help=<language> 
> feature.  For example:

So, instead of the current:

The following options are specific to the language C:
 No options with the desired characteristics were found

can't be said better:

No options are specific to the language C:
 Use --help=c to list options supported by the language C.


>    % gcc --help=java
>    The following options are supported by the language Java:

I should note that 

% gcc -v --help=c

returns the following for me

The following options are language-independent:
  --help                      Display this information
  --help=<class>              Display descriptions of a specific class of
                              options.  <class> is one or more of optimizers,
                              target, warnings, undocumented, params

I think it should say "The following options are supported by the language C".
Yes, some of those options may work on other languages, but they also may not
work in all of them. Language-independent is ambiguous.

> So I think that the bone of contention here is what should be listed by 
> "--help -v".  I think that leaving out options which have no description 
> is a good default.  If for no other reason than to encourage people to 
> write descriptions for the options so that they are then listed in the 
> --help output.

I don't think it works like this. Few GCC devs would bother to use --help to
find options. On the other hand, users will likely report a bug whenever they
find "This switch lacks documentation".

> Do you still feel that "--help -v" should list undocumented options ?

I understand Brooks was asking to list options supported by each language
rather than options specific to each language. Either way seems correct as long
as you can get the other. He also was asking to list supported options without
its description (independently whether they are documented or not) at the top
as in:

The Fortran front end recognizes the following options:

  -I, -Wall, -Wconversion, -fopenmp, -fpreprocessed, -fshort-enums

  -J<directory>               Put MODULE files in 'directory'
  -Waliasing                  Warn about possible aliasing of dummy arguments


My proposal would be:

1) Change the current empty message to mention --help=<language> as described
above.

2) List all options with --help -v, even if they are undocumented (abusing of
-Wextra for this seems unjustified to me). I would further propose that if
checking is enabled, then show the message "This switch lacks documentation",
otherwise (for releases) just show the empty string "".

Can we agree on this?


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
   Last reconfirmed|2007-03-25 22:48:12         |2008-01-22 07:51:20
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31349

Reply via email to