]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Finish cleanup/removing -Wstrict-overflow= support [PR125558]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Mon, 1 Jun 2026 20:39:36 +0000 (13:39 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 2 Jun 2026 00:49:47 +0000 (17:49 -0700)
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 <andrew.pinski@oss.qualcomm.com>
gcc/common.opt
gcc/gcc-diagnostic-spec.cc
gcc/opts.cc

index d816ed6dfb78c0cf946eb1e37aa5a137c3cb6dde..218dddf5dfe98083d58ed27853ad7772e2f6e8b9 100644 (file)
@@ -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
index 8c91f81505f16875a1f5433484361629957d5840..94bbd9e5753f519ff5eb36615a4163b9b64ac956 100644 (file)
@@ -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;
 
index 17c54b6688e73340f47d6963070b9d9329fef593..342517528e8ec79c7b5c247b3f75d80bc32102f3 100644 (file)
@@ -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;