Implement -Wswitch-fallthrough
Eric Botcazou
ebotcazou@adacore.com
Mon Jul 11 20:08:00 GMT 2016
> After I'd completed the warning, I kicked off a bootstrap so as to add
> various gcc_fallthrough calls. There were a good amount of them, as
> expected. I also grepped various FALLTHRU/Falls through/...fall
> thru.../... comments in config/ and added gcc_fallthroughs to make it
> easier for people. Wherever I wasn't sure that the gcc_fallthrough was
> appropriate, I added an 'XXX' comment. This must not be relied upon as I
> don't know most of the compiler code. The same goes for relevant libraries
> where I introduced various gomp_fallthrough macros conditional on __GNUC__
> (I'd tried to use a configure check but then decided I won't put up with
> all the vagaries of autoconf).
Do we really want to clutter up the entire tree like that? The result is
particularly ugly IMO. Just add -Wno-switch-fallthrough somewhere I'd say.
--
Eric Botcazou
More information about the Gcc-patches
mailing list