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. > > 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.
On the flip side, those patches (for GCC) were quite trivial and I've done most of the work, and it's something you only have to do once. Disabling -Werror was only necessary because I didn't investigate the problem deep enough, but this has been fixed now (the genattr.c part in <https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02024.html>) and I'm about to post a patch that removes those added -Wno-error (just waiting for aarch64 bootstrap to finish). The warning repeatedly finds bugs (I've already fixed a bunch of them), and prevents from more creeping in. The comments parsing part is contentious and tricky (and GCC might be the first compiler that attempts to do this, so we're breaking new ground), yet the warning *is* useful, and only more so with upcoming C++17 which standardizes [[fallthrough]];. Marek