https://gcc.gnu.org/g:7696c8de5ea362f9b9d8d5782da7eae3d25ee501

commit r17-1151-g7696c8de5ea362f9b9d8d5782da7eae3d25ee501
Author: Andrew Pinski <[email protected]>
Date:   Mon Jun 1 13:39:36 2026 -0700

    Finish cleanup/removing -Wstrict-overflow= support [PR125558]
    
    This finishes removing the support for -Wstrict-overflow that seemly was
    missed before. It also marks the option as being ignored and fixes
    the -Wstrict-overflow= case where it was rejecting -Wstrict-overflow=1 now.
    
    Pushed as obvious after bootstrap/test on x86_64-linux-gnu.
    
            PR middle-end/125558
    
    gcc/ChangeLog:
    
            * common.opt (Wstrict-overflow): Mark as Ignore.
            (Wstrict-overflow=): Fix up and mark as igore.
            * gcc-diagnostic-spec.cc (nowarn_spec_t::nowarn_spec_t):
            Remove OPT_Wstrict_overflow.
            * opts.cc (common_handle_option): Likewise.
    
    Signed-off-by: Andrew Pinski <[email protected]>

Diff:
---
 gcc/common.opt             | 3 ++-
 gcc/gcc-diagnostic-spec.cc | 1 -
 gcc/opts.cc                | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index d816ed6dfb78..218dddf5dfe9 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -781,10 +781,11 @@ Common Joined RejectNegative UInteger 
Var(warn_strict_aliasing) Warning
 Warn about code which might break strict aliasing rules.
 
 Wstrict-overflow
-Common Warning
+Common Ignore Warning
 Does nothing.  Preserved for backward compatibility.
 
 Wstrict-overflow=
+Common Ignore Joined RejectNegative UInteger Warning
 Does nothing.  Preserved for backward compatibility.
 
 Wsuggest-attribute=cold
diff --git a/gcc/gcc-diagnostic-spec.cc b/gcc/gcc-diagnostic-spec.cc
index 8c91f81505f1..94bbd9e5753f 100644
--- a/gcc/gcc-diagnostic-spec.cc
+++ b/gcc/gcc-diagnostic-spec.cc
@@ -59,7 +59,6 @@ nowarn_spec_t::nowarn_spec_t (opt_code opt)
     case OPT_Woverflow:
     case OPT_Wshift_count_negative:
     case OPT_Wshift_count_overflow:
-    case OPT_Wstrict_overflow:
       m_bits = NW_VFLOW;
       break;
 
diff --git a/gcc/opts.cc b/gcc/opts.cc
index 17c54b6688e7..342517528e8e 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -2951,10 +2951,6 @@ common_handle_option (struct gcc_options *opts,
       set_Wstrict_aliasing (opts, value);
       break;
 
-    case OPT_Wstrict_overflow:
-      /* Deferred.  */
-      break;
-
     case OPT_Wsystem_headers:
       dc->m_warn_system_headers = value;
       break;

Reply via email to