Re: Announce: gcc bogus warning repository

Adrian Bunk
2006-10-01T17:45:58Z

On Sun, Oct 01, 2006 at 06:27:29PM +0100, Alistair John Strachan wrote:
> On Sunday 01 October 2006 18:20, Jeff Garzik wrote:
> > Randy Dunlap wrote:
> [snip]
> > >> This repository will NEVER EVER be pushed upstream. It exists solely
> > >> for those who want to decrease their build noise, thereby exposing true
> > >> bugs.
> > >>
> > >> The audit has already uncovered several minor bugs, lending credence to
> > >> my theory that too many warnings hides bugs.
> > >
> > > I usually build with must_check etc. enabled then grep them
> > > away if I want to look for other messages. I think that the situation
> > > is not so disastrous.
> >
> > I think it's both sad, and telling, that the high level of build noise
> > has trained kernel hackers to tune out warnings, and/or build tools of
> > ever-increasing sophistication just to pick out the useful messages from
> > all the noise.
> >
> > If you have to grep useful stuff out of the noise, you've already lost.
>
> The question is whether the GCC guys are actually doing anything about the
> problem. If they are, we should do nothing. If they aren't, maybe it's time
> for "x = x" hacks like Steven's.
>...

Let's be fair to gcc:

gcc correctly tells it "may be used uninitialized" - that's different
from cases where gcc tells "is used uninitialized".

Sometimes, it requires _much_ context seeing that a condition is
actually not possible.

And there are even cases where it's technically impossible for a
compiler to figure out itself that a condition is not possible.

> Cheers,
> Alistair.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed