On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: > On 09/30/2016 11:45 AM, Jakub Jelinek wrote: > > >See Tom Tromey's explanation why accepting too much is bad (at least unless > >we want multiple levels). > > And I still don't buy it. The case where someone writes "Don't fall through" > is artificial to begin with, and also forgetting to put the break; there > really isn't something for us to be concerned about.
It doesn't have to be exactly that, fall is a substring of 200+ english, thr is a substring of 1000+ english words, if you allow arbitrary stuff in between or before it or after it, it can say anything, completely unrelated to falling through across case labels. > On the other hand, we end up having to change massive amounts of perfectly > fine code and even disabling -Werror in some places. That's the textbook > case of an awful warning. First of all, the warning is only in -Wextra, so will affect minority of programs that use it, and is likely many other a style warning, it is a good thing to enforce consistent style of these comments or eventually the attributes for projects that care about -Wextra, and as a bonus they will be able to fix real bugs in their projects. Note that lint is considerably more strict in what it accepts. Jakub