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

            Bug ID: 91220
           Summary: -Q --help=common displays options limited to subsets
                    of languages
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

While testing a fix for bug 80545 I noticed that the --help=common option has
GCC list options that are only available in a subset of languages even though
it is documented to "Display the options that are common to all languages."

Here's the output for a subset of language-specific options:

$ gcc -Q --help=common -xc - | grep -E
"(-Wcpp|-Wdeprecated|-Wmisleading-indentation|-Wstrict-aliasing|-Wstrict-overflow|-Wsystem-headers|-Wunused)"
  -Wcpp                                 [enabled]
  -Wdeprecated                          [enabled]
  -Wdeprecated-declarations             [enabled]
  -Wmisleading-indentation              [disabled]
  -Wstrict-aliasing                     
  -Wstrict-aliasing=<0,3>               0
  -Wstrict-overflow                     
  -Wstrict-overflow=<0,5>               0
  -Wsystem-headers                      [disabled]
  -Wunused                              [disabled]
  -Wunused-but-set-parameter            [disabled]
  -Wunused-but-set-variable             [disabled]
  -Wunused-function                     [disabled]
  -Wunused-label                        [disabled]
  -Wunused-parameter                    [disabled]
  -Wunused-value                        [disabled]
  -Wunused-variable                     [disabled]

The following is the output of GCC patched to list the strict subset of
languages in which each of the options is available in, and configured with
-enable-languages=all:

  -Wcpp                                 [available in C, C++, ObjC, ObjC++]
  -Wdeprecated                          [available in C, C++, D, ObjC, ObjC++]
  -Wdeprecated-declarations             [enabled]
  -Wmisleading-indentation              [available in C, C++]
  -Wstrict-aliasing                     [enabled]
  -Wstrict-aliasing=<0,3>               [available in C, C++, ObjC, ObjC++]
  -Wstrict-overflow                     [enabled]
  -Wstrict-overflow=<0,5>               [available in C, C++, ObjC, ObjC++]
  -Wsystem-headers                      [available in C, C++, ObjC, ObjC++]
  -Wunused                              [available in C, C++, ObjC, ObjC++]
  -Wunused-but-set-parameter            [disabled]
  -Wunused-but-set-variable             [disabled]
  -Wunused-function                     [disabled]
  -Wunused-label                        [disabled]
  -Wunused-parameter                    [disabled]
  -Wunused-value                        [disabled]
  -Wunused-variable                     [available in C, C++, ObjC, ObjC++]

Reply via email to