This is the mail archive of the gcc@gcc.gnu.org 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 Wed, 2005-11-02 at 12:01 -0600, Chris Lattner wrote:
[ ... big snip ... ]
> For users like myself, I would really like to have an option to switch the 
> unused var warning to be emitted from the *front-end* where it works when 
> compiling with optimization disabled (a huge feature in itself) and where 
> the warnings are more stable.  I know that it is impossible to guarantee 
> that GCC will ever match "other compilers", and that there will be false 
> positives (e.g. double diamond patterns), but for many uses this is 
> perfectly fine (other compilers warn about the same cases, so these cases 
> already have initializers).
I think it's worth noting that we build the SSA form even when we're
not optimizing.  Which in turn with running the maybe-uninitialized
warning code early would give you the warnings you expect without
needing to run the optimizers.  That's why I don't think we need to push
these warnings into the front-ends.

And I agree, we certainly have long term questions/issues regarding 
how things like IPA affect our ability to give good warnings.  It's
an area I've got very very little experience with though.

Jeff


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