[PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

Bernd Schmidt bschmidt@redhat.com
Wed Oct 12 14:04:00 GMT 2016


On 10/12/2016 01:04 PM, Markus Trippelsdorf wrote:
> I'm more concerned about the first impression that people will get from
> this warning. If the fist couple of samples they will look at are
> clearly bogus (as with the example comments above) they will very
> quickly disable the warning.
>
> And if a small one digit percentage of all potential issues falls
> through the cracks with -Wimplicit-fallthrough=1 , so be it.

Yes. Better to give mostly sensible warnings, making people aware of the 
option and maybe encouraging to try higher levels, rather than 
generating a huge amount of noise which will result in some people 
turning the warning off, some making pointles or even incorrect changes 
to their code (as we saw in gcc itself), and generating bad publicity.


Bernd



More information about the Gcc-patches mailing list