On Mon, Mar 27, 2017 at 09:27:34AM -0700, Steve Kargl wrote:
> On Mon, Mar 27, 2017 at 05:22:12PM +0200, Markus Trippelsdorf wrote:
> > On 2017.03.27 at 06:49 -0700, Steve Kargl wrote:
> > > 
> > > Go scan the gcc-patches mailing list for "fallthrough".  I'll
> > > note other have concerns.  Here's one example:
> > > 
> > > https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00300.html
> > > 
> > >    Without Bernd's patch to set the default to 1 you will drown
> > >    in false positives once you start using gcc-7 to build a whole
> > >    distro. On my Gentoo test box anything but level 1 is simply
> > >    unacceptable, because you will miss important other warnings
> > >    in the -Wimplicit-fallthrough noise otherwise.
> > 
> > The quotation doesn't have anything to do with the current discussion,
> > which is the general usefulness of the warning.
> > It only talks about one of the (admittedly over-engineered) six
> > different levels of the warning.
> > 
> 
> Yes, it does.  See the part about "... drown in false positives ..."
> Whoever turned this option on should have been prepared to deal
> with the fallout by investigating each and every warning (i.e.,
> either fix a real bug or (un)fix valid code to prevent the false
> positive).  
 
Having spent hours on fixing various fallthrough cases throughout the codebase,
deciding whether or not a particular case is an intentional fallthru, and
pursuing various maintainers if I couldn't make a call, I find your statement,
erm, incorrect .  I'm sorry that apparently something has slipped through.
I would've fixed it if I'd hit it.

The warning had been discussed extensively on the ML, and you had the chance to
chime in, too.  There's a reason why the warning is only enabled by -Wextra and
not by -Wall.

> But that's okay.  I now understand that it is acceptable for
> a developer to commit a change that causes issues for other
> developers, and said developer can turn a blind eye.

Nonsense.

        Marek

Reply via email to