Bug 31351 - gcc -v --help has poor documentation for some shared Ada/C options
Summary: gcc -v --help has poor documentation for some shared Ada/C options
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2007-03-25 22:52 UTC by Brooks Moses
Modified: 2021-08-13 07:02 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-05-09 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brooks Moses 2007-03-25 22:52:31 UTC
When an option is shared between multiple front ends, the output of gcc -v --help uses the documentation string from the first front end for which it is listed.

Ada is listed before C, and thus all of the shared Ada/C options use the Ada documentation, rather than the C documentation.  Unfortunately, the Ada lang.opt file doesn't have good documentation for some of these:

---------------------------------------
The Ada front end recognizes the following options:

  -I                          This switch lacks documentation
  -Wall                       This switch lacks documentation
  -Wlong-long                 Do not warn about using "long long" when -pedantic
  -Wmissing-format-attribute  Warn about functions which might be candidates
                              for format attributes
  -Wmissing-prototypes        Warn about global functions without prototypes
  -Wold-style-definition      Warn if an old-style parameter definition is used
  -Wstrict-prototypes         Warn about unprototyped function declarations
  -Wvariadic-macros           Do not warn about using variadic macros when
                              -pedantic
  -Wwrite-strings             In C++, nonzero means warn about deprecated
                              conversion from string literals to `char *'.  In
                              C, similar warning, except that the conversion is
                              of course not deprecated by the ISO C standard.
  -fRTS=                      This switch lacks documentation
  -gnat<options>              Specify options to GNAT
  -gnatO                      This switch lacks documentation
  -nostdinc                   Do not search standard system include directories
                              (those specified with -isystem will still be used)
  -nostdlib                   This switch lacks documentation
---------------------------------------

My personal opinion is that this would really be best fixed by listing C and C++ first in the --help output, since they're much more commonly used.  However, a workaround would be copying the C documentation to the Ada lang.opt file.
Comment 1 Manuel López-Ibáñez 2012-05-09 16:08:47 UTC
This is a bug yes, but it won't get fixed unless someone that cares about it steps up to fix it.
Comment 2 Eric Gallager 2018-11-09 13:53:44 UTC
(In reply to Manuel López-Ibáñez from comment #1)
> This is a bug yes, but it won't get fixed unless someone that cares about it
> steps up to fix it.

I'd do this but I don't know the Ada FE well enough since I never build it
Comment 3 Eric Gallager 2019-02-11 00:50:21 UTC
(In reply to Eric Gallager from comment #2)
> (In reply to Manuel López-Ibáñez from comment #1)
> > This is a bug yes, but it won't get fixed unless someone that cares about it
> > steps up to fix it.
> 
> I'd do this but I don't know the Ada FE well enough since I never build it

Update: I've now built the Ada FE once, but I still don't know it well enough