[v2,2/8] Switch to -Wimplicit-fallthrough=5

Message ID 20231121152817.31859-3-tom@tromey.com
State New
Headers
Series [v2,1/8] Use C++17 [[fallthrough]] attribute |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Tom Tromey Nov. 21, 2023, 3:27 p.m. UTC
  This changes the various gdb-related directories to use
-Wimplicit-fallthrough=5, meaning that only the fallthrough attribute
can be used in switches -- special 'fallthrough' comments will no
longer be usable.

Approved-By: Pedro Alves <pedro@palves.net>
---
 gdb/configure         | 2 +-
 gdbserver/configure   | 2 +-
 gdbsupport/configure  | 2 +-
 gdbsupport/warning.m4 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/configure b/gdb/configure
index 7e411cd7668..3dd73b0a2c8 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -31161,7 +31161,7 @@  build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough=3 \
+-Wimplicit-fallthrough=5 \
 -Wduplicated-cond \
 -Wshadow=local \
 -Wdeprecated-copy \
diff --git a/gdbserver/configure b/gdbserver/configure
index dc2ecd884a8..f1292f9b707 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -13697,7 +13697,7 @@  build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough=3 \
+-Wimplicit-fallthrough=5 \
 -Wduplicated-cond \
 -Wshadow=local \
 -Wdeprecated-copy \
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 3f262a5da78..b501b36373f 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -14162,7 +14162,7 @@  build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough=3 \
+-Wimplicit-fallthrough=5 \
 -Wduplicated-cond \
 -Wshadow=local \
 -Wdeprecated-copy \
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index ea573c63c4a..774f0208e9b 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -44,7 +44,7 @@  build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough=3 \
+-Wimplicit-fallthrough=5 \
 -Wduplicated-cond \
 -Wshadow=local \
 -Wdeprecated-copy \