This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wuninitialized issues

On Tuesday 01 November 2005 13:17, Jeffrey A Law wrote:

> Possibly a useful thing to have, but I don't think we want to put
> the burden of detecting uninitialized variables onto each
> optimizer :-)
Heh.  Indeed.

> I think false positives are inevitable if we attempt to solve the
> problems Mark is complaining about.  That's part of the reason why
> I think this needs to be switch controlled.

> Your example is probably derived from C code which looks something
> like this:
Yeah, it's gcc.dg/m-un-1.c, IIRC.

> Clearly the message could be better, but it's easy to see how this
> warning distinguishes itself from the "blah may be used uninitialized in
> this function" warning we give in other cases.  We clearly state that
> it appeared to be used uninitialized, but optimizations changed that
> assessment.
Sounds good.

We won't get perfect answers, which is fine given the nature of the 
problem.  However, I would like, to get *consistent* answers.  If we 
decide to re-organize the optimization pipeline, we should not be getting 
different -Wuninitialized behaviour.  Perhaps that's an easier problem to 
solve.  For instance, for GCC bootstraps we could ignore the warning when 
it's from "... but was later optimized away ...".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]