Chris Lattner - Re: -Wuninitialized issues (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
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.