]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Use gcc -Wimplicit-fallthrough=2 by default if available
authorMark Wielaard <mark@wildebeest.org>
Tue, 12 Mar 2019 22:17:32 +0000 (23:17 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 27 Mar 2019 14:34:45 +0000 (15:34 +0100)
commitf04ae9f359411a2fff42f6c4b72fb8b0e56f5f58
tree31c3d89c2f25dadc6bba70f03b746c135e9dd604
parentd6da48fe5ac2e94fe28184ff334cd6b2283ef9a6
Use gcc -Wimplicit-fallthrough=2 by default if available

GCC 7 instroduced -Wimplicit-fallthrough
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

It caught a couple of bugs, but it does need a bit of extra comments to
explain when a switch case statement fall-through is deliberate. Luckily
with -Wimplicit-fallthrough=2 various existing comments already do that.
I have fixed the bugs, but adding explicit break statements where
necessary and added comments where the fall-through was correct.

https://bugs.kde.org/show_bug.cgi?id=405430
16 files changed:
Makefile.all.am
NEWS
VEX/priv/guest_amd64_toIR.c
VEX/priv/guest_arm64_toIR.c
VEX/priv/guest_arm_toIR.c
VEX/priv/guest_mips_toIR.c
VEX/priv/guest_ppc_toIR.c
VEX/priv/guest_x86_toIR.c
VEX/priv/host_arm64_isel.c
VEX/priv/host_arm_isel.c
VEX/priv/host_mips_defs.c
VEX/priv/host_mips_isel.c
configure.ac
coregrind/m_gdbserver/m_gdbserver.c
coregrind/m_syswrap/syswrap-linux.c
memcheck/mc_malloc_wrappers.c