[gcc(refs/users/guojiufu/heads/guojiufu-branch)] lto/95190 - amend -flto docs for diagnostic option handling

Jiu Fu Guo guojiufu@gcc.gnu.org
Wed Jun 10 03:03:13 GMT 2020


https://gcc.gnu.org/g:ab7eca92926fdc1da880120c116a1832fce56a29

commit ab7eca92926fdc1da880120c116a1832fce56a29
Author: Richard Biener <rguenther@suse.de>
Date:   Tue May 19 08:36:13 2020 +0200

    lto/95190 - amend -flto docs for diagnostic option handling
    
    This documents new GCC 10 behavior on diagnostic options and -flto.
    
    2020-05-22  Richard Biener  <rguenther@suse.de>
    
            PR lto/95190
            * doc/invoke.texi (flto): Document behavior of diagnostic
            options.

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

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 390a344e459..0c3045a6005 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-22  Richard Biener  <rguenther@suse.de>
+
+	PR lto/95190
+	* doc/invoke.texi (flto): Document behavior of diagnostic
+	options.
+
 2020-05-22  Richard Biener  <rguenther@suse.de>
 
 	* tree-vectorizer.h (vect_is_simple_use): New overload.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 7217e27151d..8b9935dfe65 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11205,6 +11205,14 @@ conflicting translation units.  Specifically
 precedence; and for example @option{-ffp-contract=off} takes precedence
 over @option{-ffp-contract=fast}.  You can override them at link time.
 
+Diagnostic options such as @option{-Wstringop-overflow} are passed
+through to the link stage and their setting matches that of the
+compile-step at function granularity.  Note that this matters only
+for diagnostics emitted during optimization.  Note that code
+transforms such as inlining can lead to warnings being enabled
+or disabled for regions if code not consistent with the setting
+at compile time.
+
 When you need to pass options to the assembler via @option{-Wa} or
 @option{-Xassembler} make sure to either compile such translation
 units with @option{-fno-lto} or consistently use the same assembler


More information about the Gcc-cvs mailing list