]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix the clang build
authorTom Tromey <tom@tromey.com>
Thu, 10 May 2018 14:38:51 +0000 (08:38 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 10 May 2018 16:05:35 +0000 (10:05 -0600)
Simon pointed out that gdb would not build with clang, due to the
addition of -Wimplicit-fallthrough.  This patch fixes the problem by
using -Wimplicit-fallthrough=3 -- this does not work with clang,
bypassing the issue.

Tested by rebuilding with both gcc and clang; and also by verifying
that -Wimplicit-fallthrough=3 is used in the gcc build.

I will file a follow-up bug to convert the fall-through comments to a
form that can be used by both clang and gcc.

gdb/ChangeLog
2018-05-10  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.
* warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.

gdb/gdbserver/ChangeLog
2018-05-10  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.

gdb/ChangeLog
gdb/configure
gdb/gdbserver/ChangeLog
gdb/gdbserver/configure
gdb/warning.m4

index 3467467383a834a8d31f4aac9d0a7664a542a1e3..f5ae5250c689f3c5d6d2cc7b52934218c72e5d3c 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-10  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+       * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
+
 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
 
        PR server/23158:
index 0eec780bd16acdbccc91a5076acba592dfece3e3..4186f7e160515ede983f36850de3bb33a35f68a7 100755 (executable)
@@ -15367,7 +15367,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough \
+-Wimplicit-fallthrough=3 \
 -Wduplicated-cond"
 
 case "${host}" in
index 9ead1220a7c39fccc018df1066c827a8c073d454..36915cf736b4311fd5471a36e293a62754c911df 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-10  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+
 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
 
        PR server/23158:
index ac61ba3543fecf199338c71087ed02000edcb211..b2e2e8f955a0e64b9aae8a73d259ebd845519a86 100755 (executable)
@@ -7174,7 +7174,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough \
+-Wimplicit-fallthrough=3 \
 -Wduplicated-cond"
 
 case "${host}" in
index cb23472ec6caef8e9a269b5c01cb3211f80b7fb1..632cc214ac0bf693bdf9f1da1f73cf6410f7776c 100644 (file)
@@ -44,7 +44,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
--Wimplicit-fallthrough \
+-Wimplicit-fallthrough=3 \
 -Wduplicated-cond"
 
 case "${host}" in