-Wterminate description is missing in "Options to Request or Suppress Warnings".
index debd8ed..9c8aa99 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2882,6 +2882,12 @@ Warn when overload resolution chooses a promotion from unsigned or enumerated type to a signed type, over a conversion to an unsigned type of the same size. Previous versions of G++ tried to preserve unsignedness, but the standard mandates the current behavior. + +@item -Wno-terminate @r{(C++ and Objective-C++ only)} +@opindex Wterminate +@opindex Wno-terminate +Disable the warning about a throw-expression that will immediately +result in a call to @code{terminate}. @end table
That is because this is C++ only option. It is listed under https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options : -Wno-terminate (C++ and Objective-C++ only) Disable the warning about a throw-expression that will immediately result in a call to terminate. This is exact location for all other C++ only options are located. So not a bug.
(In reply to Andrew Pinski from comment #2) > That is because this is C++ only option. It is listed under > https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/C_002b_002b-Dialect-Options. > html#C_002b_002b-Dialect-Options : > > -Wno-terminate (C++ and Objective-C++ only) > Disable the warning about a throw-expression that will immediately result in > a call to terminate. > > This is exact location for all other C++ only options are located. > > So not a bug. There are other C++-only options under "Options to Request or Suppress Warnings". For example: * -Wc++11-compat * -Wc++14-compat * -Wconditionally-supported * -Wno-conversion-null * -Wzero-as-null-pointer-constant * -Wsubobject-linkage * -Wdelete-incomplete * -Wuseless-cast * -Wsized-deallocation * -Wno-invalid-offsetof It's kind of inconsistent whether C++-only warnings are listed here or there.
(In reply to Eric Gallager from comment #3) > There are other C++-only options under "Options to Request or Suppress > Warnings". > For example: > * -Wc++11-compat > * -Wc++14-compat > * -Wconditionally-supported > * -Wno-conversion-null > * -Wzero-as-null-pointer-constant > * -Wsubobject-linkage > * -Wdelete-incomplete > * -Wuseless-cast > * -Wsized-deallocation > * -Wno-invalid-offsetof > > It's kind of inconsistent whether C++-only warnings are listed here or there. The perfect solution would be to move the options documentation to the *.opt files where they are defined and auto-generate the corresponding parts of the *.texi files from the *.opt files. This way the documentation would be much more consistent. This is similar to what we already do for target-hooks: see gcc/target.def That would be a very nice little project for a newbie. The short-term solution is for someone to propose patches to move those to the correct place: https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
Martin Sebor brought this up on the mailing lists here: https://gcc.gnu.org/ml/gcc/2018-04/msg00021.html
I'm trying to fix this for GCC 8.
(In reply to Martin Sebor from comment #6) > I'm trying to fix this for GCC 8. GCC 8 has been released. Deferred for GCC 9 then?
*** Bug 87684 has been marked as a duplicate of this bug. ***
GCC 9.1 has been released.
GCC 9.2 has been released.
Martin, did you want to stay the assignee for this? Sandra seemed to want to address this bug here: https://gcc.gnu.org/ml/gcc-patches/2020-02/msg01522.html
I'm not working on this right now.
GCC 9.3.0 has been released, adjusting target milestone.
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
@marxin: does your porting of GCC documentation to sphinx address this issue at all?
(In reply to Eric Gallager from comment #15) > @marxin: does your porting of GCC documentation to sphinx address this issue > at all? If I see correctly, it's not addressed. The C++ options are listed at the following 2 pages: https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-controlling-c%2B%2B-dialect.html https://splichal.eu/gccsphinx-final/html/gcc/gcc-command-options/options-to-request-or-suppress-warnings.html What's new that I generated entry for e.g.: -Wno-format Default option value for -Wformat.
(In reply to Andrew Pinski from comment #2) > That is because this is C++ only option. It is listed under > https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/C_002b_002b-Dialect-Options. > html#C_002b_002b-Dialect-Options : > > -Wno-terminate (C++ and Objective-C++ only) > Disable the warning about a throw-expression that will immediately result in > a call to terminate. > > This is exact location for all other C++ only options are located. > > So not a bug. Sure, but right now some warnings are under Warning Options and others are under Dialect Options. I would never think to look for warnings under dialect options, since my initial thought would be that the latter is for the kinds of things that show up first on that page... -fabi-version, -fchar8_t, etc. You have to go pretty far down that page to get to warnings. -Wsuggest-override used to be under Warning Options, was recently moved to Dialect Options for instance. I would like to request that either all the warning options are documented under warning options, or that there is one page for all the C++ warning options (as distinct from "dialect options"), or something else along those lines. The current split is a bit confusing and makes it hard to find warnings.
Florian Weimer was wondering about this general issue (of inconsistency in location of documentation for common C/C++ options) on the mailing lists recently: https://gcc.gnu.org/pipermail/gcc/2023-October/242669.html