This is the mail archive of the
mailing list for the GCC project.
Re: Warning annoyances in list_read.c
On Mon, Mar 27, 2017 at 06:45:32PM +0200, Marek Polacek wrote:
> 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.
A grep of the ChangeLog* files in libgfortran suggests that
whoever turned on this option made no effort with regards to
% grep -i marek ChangeLog ChangeLog-2016
% grep -i polacek ChangeLog ChangeLog-2016
% grep -i fall ChangeLog ChangeLog-2016
ChangeLog-2016: (_gfortran_caf_is_present): Prevent fallthrough warnings.
ChangeLog-2016: MinGW-w64. Fix bounds overflow in fallback code.
The _gfortran_caf_is_present change was made by Andre Vehreschild.