https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122243

            Bug ID: 122243
           Summary: Hundreds of options are missing @opindex entries in
                    manual
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sandra at gcc dot gnu.org
            Blocks: 122242
  Target Milestone: ---

Created attachment 62537
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62537&action=edit
bash script to find options missing @opindex entries

In conjunction with pr122242, I put together a hacky shell script to try look
for options that had no @opindex entry to at least scope out the extent of the
problem and possibly use as a base for scripting to add the missing index
entries mechanically.  There are hundreds of them.  :-(  Somewhat more
surprising, there are also hundreds of options that are missing index entries
in their positive form as well.

I believe a bunch of the missing -no entries are actually bugs in the input
.opt files.  E.g. probably all options of the form "-ffoo=" with the Joined
attribute should have a RejectNegative to inhibit the -fno-foo= form, and all
explicit options starting with "-fno-" should also have RejectNegative.

I spot-checked about a dozen of the options listed as missing index entries for
the positive form; in some cases they're missing documentation entirely, I saw
at least one listed in the "Option Summary" but missing detailed documentation,
and some that had detailed documention in the right place but missing @opindex
entries.  I believe some of them may also have entries that don't quite match
the name of the option (in spite of my efforts to make the script more lax
about matching options that take arguments).

Anyway:

- probably all the options that are showing up as missing an index entry for
the positive form need to be checked/fixed manually

- some manual effort is also needed to clean up the .opt files to add
RejectNegative where it makes sense

- given a list of options that have an @opindex for the positive form but are
missing one for the negative form, that can easily be fixed mechanically.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122242
[Bug 122242] options should always be documented in positive form regardless of
default setting

Reply via email to