Re: [PATCH] Use -Wimplicit-fallthrough only with GCC >= 7

2022-01-05 Thread Bruno Haible
Hi José, > The -Wimplicit-fallthrough switch was introduced in GCC 7. > > Older version of GCC (like 3 and 4) do not complain when they get passed > an invalid -WFOO option It depends on the option: $ gcc-version 3.1 -Wimplicit-fallthrough -S /tmp/empty.c $ gcc-version 3.2.2 -Wimplicit-fallt

[PATCH] Use -Wimplicit-fallthrough only with GCC >= 7

2022-01-05 Thread Jose E. Marchesi
Hi people! The -Wimplicit-fallthrough switch was introduced in GCC 7. Older version of GCC (like 3 and 4) do not complain when they get passed an invalid -WFOO option, but GCC 6 bails out like this: gcc: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-f