On 10/19/2016 10:26 AM, Jan-Benedict Glaw wrote:
Hi!
I noticed that building for --target=s390-linux-gnu (via
config_list.mk) also hits the new fall-through checking code,
see build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=643406:
[...]
g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos-configlist_mk/gcc/gcc
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/.
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../include
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libcpp/include
-I/opt/cfarm/mpc/include
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber
-I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber/dpd
-I../libdecnumber -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libbacktrace
-o insn-output.o -MT insn-output.o -MMD -MP -MF ./.deps/insn-output.TPo
insn-output.c
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/s390/s390.md: In function
‘const char* output_1786(rtx_def**, rtx_insn*)’:
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/s390/s390.md:10630:9: error:
this statement may fall through [-Werror=implicit-fallthrough=]
if (larl_operand (operands[0], Pmode))
^~
/home/jbglaw/repos-configlist_mk/gcc/gcc/config/s390/s390.md:10632:7: note: here
default:
^~~~~~~
cc1plus: all warnings being treated as errors
Makefile:1097: recipe for target 'insn-output.o' failed
From reading the comments in that pattern, I think falling-through is
safe and expected. So just adding an appropriate fallthru comment
should fix this.
jeff