FALLTHROUGH warning in quotearg.c with gcc-7.1
(too old to reply)
Jim Meyering
2017-05-26 00:44:59 UTC
Raw Message
Pulling the latest gnulib and compling with gcc-7.1,
gcc-7.1 -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -Ilib
-I./lib -Isrc -I./src -g -O2 -MT lib/quotearg.o -MD -MP -MF $depbase.Tpo
-c -o lib/quotearg.o lib/quotearg.c &&\
mv -f $depbase.Tpo $depbase.Po
lib/quotearg.c:61:23: warning: attribute 'fallthrough' not preceding a case
label or default label
# define FALLTHROUGH __attribute__ ((__fallthrough__))
lib/quotearg.c:516:11: note: in expansion of macro 'FALLTHROUGH'
949b6cc fallthrough: reinstate a FALLTHROUGH instance in quotearg
11fdf80 fallthrough: update for GCC 7/8
The warning appears even if I use an older revision of gnulib.
I haven't yet tried to investigate further,
but note this is with 'gnu datamash', not 'coreutils' - it's
possible there's a project-specific problem, not gnulib problem.
Thanks for the heads up. It is due to 949b6cc, whose one-line summary
is misleading. That commit did not reinstate a use of the macro. The
macro works only just before a case statement. Instead of a use of the
macro, it should be a mere comment, like it was before.