A bunch of warning options are missing an @opindex entry, usually for the negative form. I went through them all and added them where it made sense.
Unless there are objections I will commit the patch to trunk next week. I think the patch is also appropriate for release branches (modulo options that don't exist there), so likewise, unless Jakub or Richard feel differently I will backport it to GCC 6 and 7. Martin
gcc/ChangeLog: * doc/invoke.texi (-Wall): List -Wc++17-compat. (Wno-class-memaccess): Add @opindex. (Wno-templates, Wno-multiple-inheritance): Same. (Wno-virtual-inheritance, Wno-namespaces): Same. (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same. (Wno-format-overflow, Wno-format-truncation): Same. (Wno-unused-local-typedefs, Walloc-size-larger-than): Same. (Wno-alloc-size-larger-than, Wframe-larger-than): Same (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same. (Wno-c++14-compat, Wno-c++17-compat, Wno-openm-simd): Same. (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same. (Wno-misspelled-isr): Same. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 261296) +++ gcc/doc/invoke.texi (working copy) @@ -267,7 +267,7 @@ Objective-C and Objective-C++ Dialects}. -Wno-attributes -Wbool-compare -Wbool-operation @gol -Wno-builtin-declaration-mismatch @gol -Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol --Wc++-compat -Wc++11-compat -Wc++14-compat @gol +-Wc++-compat -Wc++11-compat -Wc++14-compat -Wc++17-compat @gol -Wcast-align -Wcast-align=strict -Wcast-function-type -Wcast-qual @gol -Wchar-subscripts -Wchkp -Wcatch-value -Wcatch-value=@var{n} @gol -Wclobbered -Wcomment -Wconditionally-supported @gol @@ -3040,6 +3040,7 @@ C++17 it calls @code{f<void(*)()noexcept>}. @item -Wclass-memaccess @r{(C++ and Objective-C++ only)} @opindex Wclass-memaccess +@opindex Wno-class-memaccess Warn when the destination of a call to a raw memory function such as @code{memset} or @code{memcpy} is an object of class type, and when writing into such an object might bypass the class non-trivial or deleted constructor @@ -3226,6 +3227,7 @@ unsignedness, but the standard mandates the curren @item -Wtemplates @r{(C++ and Objective-C++ only)} @opindex Wtemplates +@opindex Wno-templates Warn when a primary template declaration is encountered. Some coding rules disallow templates, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so @@ -3234,6 +3236,7 @@ templates. @item -Wmultiple-inheritance @r{(C++ and Objective-C++ only)} @opindex Wmultiple-inheritance +@opindex Wno-multiple-inheritance Warn when a class is defined with multiple direct base classes. Some coding rules disallow multiple inheritance, and this may be used to enforce that rule. The warning is inactive inside a system header file, @@ -3242,6 +3245,7 @@ classes that indirectly use multiple inheritance. @item -Wvirtual-inheritance @opindex Wvirtual-inheritance +@opindex Wno-virtual-inheritance Warn when a class is defined with a virtual direct base class. Some coding rules disallow multiple inheritance, and this may be used to enforce that rule. The warning is inactive inside a system header file, @@ -3250,6 +3254,7 @@ classes that indirectly use virtual inheritance. @item -Wnamespaces @opindex Wnamespaces +@opindex Wno-namespaces Warn when a namespace definition is opened. Some coding rules disallow namespaces, and this may be used to enforce that rule. The warning is inactive inside a system header file, such as the STL, so one can still @@ -3880,6 +3885,7 @@ warns that an unrecognized option is present. @itemx -pedantic @opindex pedantic @opindex Wpedantic +@opindex Wno-pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the @@ -4063,11 +4069,13 @@ This warning is enabled by @option{-Wall}. @item -Wchkp @opindex Wchkp +@opindex Wno-chkp Warn about an invalid memory access that is found by Pointer Bounds Checker (@option{-fcheck-pointer-bounds}). @item -Wno-coverage-mismatch @opindex Wno-coverage-mismatch +@opindex Wcoverage-mismatch Warn if feedback profiles do not match when using the @option{-fprofile-use} option. If a source file is changed between compiling with @option{-fprofile-gen} and @@ -4317,7 +4325,7 @@ logic @option{-Wformat-overflow}. @item -Wformat-truncation @itemx -Wformat-truncation=1 @opindex Wformat-truncation -@opindex Wno-format-overflow +@opindex Wno-format-truncation Level @var{1} of @option{-Wformat-truncation} enabled by @option{-Wformat} employs a conservative approach that warns only about calls to bounded functions whose return value is unused and that will most likely result @@ -4974,6 +4982,7 @@ To suppress this warning use the @code{unused} att @item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)} @opindex Wunused-local-typedefs +@opindex Wno-unused-local-typedefs Warn when a typedef locally defined in a function is not used. This warning is enabled by @option{-Wall}. @@ -5507,6 +5516,8 @@ of @code{realloc} has been deprecated) relying on portability bugs and should be avoided. @item -Walloc-size-larger-than=@var{n} +@opindex Walloc-size-larger-than=@var{n} +@opindex Wno-alloc-size-larger-than Warn about calls to functions decorated with attribute @code{alloc_size} that attempt to allocate objects larger than the specified number of bytes, or where the result of the size computation in an integer type with infinite @@ -5941,6 +5952,7 @@ This warning is enabled by @option{-Wshadow=local} Warn whenever an object of larger than @var{len} bytes is defined. @item -Wframe-larger-than=@var{len} +@opindex Wframe-larger-than=@var{len} @opindex Wframe-larger-than Warn if the size of a function frame is larger than @var{len} bytes. The computation done to determine the stack frame size is approximate @@ -5959,6 +5971,7 @@ on the heap. @item -Wstack-usage=@var{len} @opindex Wstack-usage +@opindex Wno-stack-usage Warn if the stack usage of a function might be larger than @var{len} bytes. The computation done to determine the stack usage is conservative. Any space allocated via @code{alloca}, variable-length arrays, or related @@ -6125,6 +6138,7 @@ disabled in the expression that follows @code{__ex @item -Wc++-compat @r{(C and Objective-C only)} @opindex Wc++-compat +@opindex Wno-c++-compat Warn about ISO C constructs that are outside of the common subset of ISO C and ISO C++, e.g.@: request for implicit conversion from @code{void *} to a pointer to non-@code{void} type. @@ -6131,6 +6145,7 @@ ISO C and ISO C++, e.g.@: request for implicit con @item -Wc++11-compat @r{(C++ and Objective-C++ only)} @opindex Wc++11-compat +@opindex Wno-c++11-compat Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011, e.g., identifiers in ISO C++ 1998 that are keywords in ISO C++ 2011. This warning turns on @option{-Wnarrowing} and is @@ -6138,11 +6153,13 @@ enabled by @option{-Wall}. @item -Wc++14-compat @r{(C++ and Objective-C++ only)} @opindex Wc++14-compat +@opindex Wno-c++14-compat Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014. This warning is enabled by @option{-Wall}. @item -Wc++17-compat @r{(C++ and Objective-C++ only)} @opindex Wc++17-compat +@opindex Wno-c++17-compat Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017. This warning is enabled by @option{-Wall}. @@ -6747,6 +6764,7 @@ Requires @option{-flto-odr-type-merging} to be ena @item -Wopenmp-simd @opindex Wopenm-simd +@opindex Wno-openm-simd Warn if the vectorizer cost model overrides the OpenMP simd directive set by user. The @option{-fsimd-cost-model=unlimited} option can be used to relax the cost model. @@ -7060,6 +7078,7 @@ This option is implied by @option{-Wpedantic}, and @item -Wunsuffixed-float-constants @r{(C and Objective-C only)} @opindex Wunsuffixed-float-constants +@opindex Wno-unsuffixed-float-constants Issue a warning for any floating constant that does not have a suffix. When used together with @option{-Wsystem-headers} it @@ -16965,11 +16984,13 @@ Don't link against AVR-LibC's device specific libr @item -Waddr-space-convert @opindex Waddr-space-convert +@opindex Wno-addr-space-convert Warn about conversions between address spaces in the case where the resulting address space is not contained in the incoming address space. @item -Wmisspelled-isr @opindex Wmisspelled-isr +@opindex Wno-misspelled-isr Warn if the ISR is misspelled, i.e. without __vector prefix. Enabled by default. @end table