PR driver/92757 * doc/invoke.texi (Warning Options): Add caveat about some warnings depending on optimization settings.
The bug reporter wants this clarified. I'm not entirely convinced it's necessary, but it doesn't seem to do any harm. OK for trunk?
commit 5e0f6aebde20712f318d3bcfcd25809e04be4460 Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon Dec 2 21:32:54 2019 +0000 doc: Note that some warnings depend on optimizations (PR 92757) PR driver/92757 * doc/invoke.texi (Warning Options): Add caveat about some warnings depending on optimization settings. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d165f31a865..099faf5f662 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4361,6 +4361,11 @@ are being produced. This allows the use of new @option{-Wno-} options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present. +The effectiveness of some warnings depends on optimizations also being +enabled. For example @option{-Wsuggest-final-types} is more effective +with link-time optimization and @option{-Wmaybe-uninitialized} will not +warn at all unless optimization is enabled. + @table @gcctabopt @item -Wpedantic @itemx -pedantic