[gcc/devel/c++-modules] doc: Note that some warnings depend on optimizations (PR 92757)
Nathan Sidwell
nathan@gcc.gnu.org
Wed Jan 15 14:32:00 GMT 2020
https://gcc.gnu.org/g:aef85e40e0c5e242f1a1883abc56159dcd90e7b0
commit aef85e40e0c5e242f1a1883abc56159dcd90e7b0
Author: Jonathan Wakely <jwakely@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:
---
gcc/ChangeLog | 6 ++++++
gcc/doc/invoke.texi | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f7df073..b2d12f4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f2c805c..ab307b8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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
More information about the Gcc-cvs
mailing list