This is the mail archive of the
mailing list for the GCC project.
Re: Warning annoyances in list_read.c
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Jerry DeLisle <jvdelisle at charter dot net>, gfortran <fortran at gcc dot gnu dot org>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 27 Mar 2017 08:58:43 +0200
- Subject: Re: Warning annoyances in list_read.c
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <20170326184534.GA18723@troutmask.apl.washington.edu> <firstname.lastname@example.org> <20170327023050.GA20895@troutmask.apl.washington.edu>
On 2017.03.26 at 19:30 -0700, Steve Kargl wrote:
> On Sun, Mar 26, 2017 at 06:45:07PM -0700, Jerry DeLisle wrote:
> > On 03/26/2017 11:45 AM, Steve Kargl wrote:
> > > On Sun, Mar 26, 2017 at 11:27:59AM -0700, Jerry DeLisle wrote:
> > >>
> > >> +#pragma GCC diagnostic push
> > >> +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
> > >
> > > IMNSHO, the correct fix is to complain loudly to whomever
> > > added -Wimplicit-fallthrough to compiler options. It should
> > > be removed (especially if is has been added to -Wall).
> > >
> > > You can also probably add -Wno-implicit-fallthrough to
> > > libgfortran/configure.ac at
> > >
> > > # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
> > > if test "x$GCC" = "xyes"; then
> > > AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
> > >
> > Problem I have is I don't know who to complain to. I think there is a bit of a
> > glass wall going on here anyway, so what would be the point of complaining if
> > the retrievers of the message all have the ON-OFF switch in the OFF position.
> > (After all, I do not have a PHD, I am not a computer science graduate, why
> > bother looking down ones nose at a low life such as myself, OMG its an engineer,
> > what the hell does he know.)
> > Maybe these warnings are being turned on as a matter of policy, but truth is,
> > when I build 50 times a day, the warnings flying by are masking the errors or
> > other warnings that may be important. For example, I inadvertently passed a ptr
> > to a function rather than the *ptr.
> > The warning that ensued flew by mixed in with all the other crap warnings and I
> > did not see it. That cost me wasted cycle time (remember, I am not an expert and
> > should not be expected to see such things. Hell, for that matter I should not
> > even be doing any of this work. :)
> This option is clearly enforceing someone's preferred markup of
> adding a comment to explicitly note a fall through. Candidate
> individual to complain to
> If he added a new option affecting libgfortran, then he should
> fix up libgfortran.
He didn't add the warning to specifically annoy fortran developers.
It is trivial to add seven gcc_fallthrough() or breaks for someone who
knows the code and the person who added the warning obviously doesn't.