Fix the clang build

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.
This commit is contained in:
Tom Tromey 2018-05-10 08:38:51 -06:00
parent 6688183925
commit 1a34f210bb
5 changed files with 12 additions and 3 deletions

View 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:

2
gdb/configure vendored
View File

@ -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

View 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:

View File

@ -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

View 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