public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-8-branch)] doc: Note that some warnings depend on optimizations (PR 92757)
@ 2020-09-17 16:51 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2020-09-17 16:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:99a735e48fdab6d2cf718eb290492a8a3190d203

commit 99a735e48fdab6d2cf718eb290492a8a3190d203
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Mar 19 15:33:02 2020 +0000

    doc: Note that some warnings depend on optimizations (PR 92757)
    
    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.

Diff:
---
 gcc/ChangeLog       | 9 +++++++++
 gcc/doc/invoke.texi | 5 +++++
 2 files changed, 14 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8118077d21a..631032595ed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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-13  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/94163
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f3d7c5720b7..83c95892029 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -3859,6 +3859,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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-17 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 16:51 [gcc(refs/vendors/redhat/heads/gcc-8-branch)] doc: Note that some warnings depend on optimizations (PR 92757) Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).