From c62b02660933852d0d5528aee02d8509be13423a Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:25:57 -0700 Subject: Moves -Wstrict-overflow=5 to the developer warnings (#1878) --- config/gnu-warnings/4.8 | 3 --- config/gnu-warnings/cxx-4.8 | 3 --- config/gnu-warnings/cxx-developer-4.8 | 7 ++++++- config/gnu-warnings/developer-4.8 | 7 +++++++ config/gnu-warnings/no-cxx-developer-4.8 | 3 +++ config/gnu-warnings/no-developer-4.8 | 3 ++- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8 index 102ed3e..b4eecdf 100644 --- a/config/gnu-warnings/4.8 +++ b/config/gnu-warnings/4.8 @@ -7,9 +7,6 @@ -Wpacked-bitfield-compat -Wsync-nand -# warning flag added for GCC >= 4.5 --Wstrict-overflow=2 - # This warning can only be truly addressed using the gcc extension of # using D to indicate doubles (e.g., 1.23D). -Wno-unsuffixed-float-constants diff --git a/config/gnu-warnings/cxx-4.8 b/config/gnu-warnings/cxx-4.8 index 6f920b2..3bbcbf6 100644 --- a/config/gnu-warnings/cxx-4.8 +++ b/config/gnu-warnings/cxx-4.8 @@ -7,9 +7,6 @@ -Wpacked-bitfield-compat -Wsync-nand -# warning flag added for GCC >= 4.5 --Wstrict-overflow=2 - # warning flags added for GCC >= 4.6 -Wdouble-promotion -Wtrampolines diff --git a/config/gnu-warnings/cxx-developer-4.8 b/config/gnu-warnings/cxx-developer-4.8 index e0d975f..f5fbdad 100644 --- a/config/gnu-warnings/cxx-developer-4.8 +++ b/config/gnu-warnings/cxx-developer-4.8 @@ -1,5 +1,10 @@ -# developer warning flags added for GCC >= 4.5 +# developer warning flag added for GCC >= 4.5 # +# strict-overflow level 5 catches a LOT of false positives, but is useful +# for detecting overflow conditions. +# +-Wstrict-overflow=5 + # developer warning flag added for GCC >= 4.6 -Wsuggest-attribute=const diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8 index bfd15a1..be7720c 100644 --- a/config/gnu-warnings/developer-4.8 +++ b/config/gnu-warnings/developer-4.8 @@ -6,6 +6,13 @@ # -Wjump-misses-init +# developer warning flag added for GCC >= 4.5 +# +# strict-overflow level 5 catches a LOT of false positives, but is useful +# for detecting overflow conditions. +# +-Wstrict-overflow=5 + # developer warning flag added for GCC >= 4.6 -Wsuggest-attribute=const diff --git a/config/gnu-warnings/no-cxx-developer-4.8 b/config/gnu-warnings/no-cxx-developer-4.8 index 3c3de93..d4d00e3 100644 --- a/config/gnu-warnings/no-cxx-developer-4.8 +++ b/config/gnu-warnings/no-cxx-developer-4.8 @@ -1,3 +1,6 @@ +# no-developer warning flag added for GCC >= 4.5 +-Wstrict-overflow=2 + # no-developer warning flag added for GCC >= 4.6 -Wno-suggest-attribute=const diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8 index 09a9a96..412b907 100644 --- a/config/gnu-warnings/no-developer-4.8 +++ b/config/gnu-warnings/no-developer-4.8 @@ -1,5 +1,6 @@ -# no-developer warning flag added for GCC >= 4.5 +# no-developer warning flags added for GCC >= 4.5 -Wno-jump-misses-init +-Wstrict-overflow=2 # no-developer warning flag added for GCC >= 4.6 -Wno-suggest-attribute=const -- cgit v0.12