]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: Note that some warnings depend on optimizations (PR 92757)
authorJonathan Wakely <jwakely@redhat.com>
Mon, 2 Dec 2019 21:32:54 +0000 (21:32 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 13 Jan 2020 13:18:00 +0000 (13:18 +0000)
PR driver/92757
* doc/invoke.texi (Warning Options): Add caveat about some warnings
depending on optimization settings.

gcc/ChangeLog
gcc/doc/invoke.texi

index f7df07343d1b3e63acf43faae829b3ed14ac9631..b2d12f4ccb90cee81bbd34f8b2174bff95298512 100644 (file)
@@ -1,3 +1,9 @@
+2020-01-13  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR driver/92757
+       * doc/invoke.texi (Warning Options): Add caveat about some warnings
+       depending on optimization settings.
+
 2020-01-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/90838
index f2c805c0a64d7f5c78863fb1bbfb029fc7618313..ab307b8e53a8b1d1b925f873dcd54df1c017a387 100644 (file)
@@ -4575,6 +4575,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