]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: Note that some warnings depend on optimizations (PR 92757)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 19 Mar 2020 15:33:02 +0000 (15:33 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 19 Mar 2020 15:33:02 +0000 (15:33 +0000)
Backport from mainline
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.

gcc/ChangeLog
gcc/doc/invoke.texi

index 90a5cf5c8d82d599673ecebbbd53d7674afd958a..91bcc48cecab8316b89f742ec7a3dc81b4c45963 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-19  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline
+       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-03-19  Jiufu Guo  <guojiufu@linux.ibm.com>
 
        PR target/93709
index 0ab6c9c64494a7ead4e8da7bced553147770a4a9..0f6247caf5151990d9ad121d337f68fbef1f83e0 100644 (file)
@@ -4313,6 +4313,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