This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wuninitialized issues
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mark at codesourcery dot com (Mark Mitchell)
- Cc: dnovillo at redhat dot com (Diego Novillo), law at redhat dot com, ghazi at caipclassic dot rutgers dot edu (Kaveh R. Ghazi), gcc at gcc dot gnu dot org
- Date: Wed, 2 Nov 2005 19:52:10 -0500 (EST)
- Subject: Re: -Wuninitialized issues
>
> Diego Novillo wrote:
>
> > Agreed 100%. My vote is to use your proposal for -Wuninitialized and have,
> > as you said, another flag that does the analysis immediately after going
> > into SSA, before any transformations are done.
>
> It certainly doesn't bother me to have -Wuninitialized continue to mean
> what it does, and have some other flag that means something else. Or,
> even -Wuninitialized=2, or something. I think it's fine to have modes
> here, and I agree that there are (clearly!) constituencies that want
> both the lint-like mode and the valgrind-like mode.
If we are register votes yet, here is mine.
Have -Wuninitialized be a very simple detector, which is either in the front-ends
or in the middle-end so it could be shared (just like -Wunused).
Have -Wuninitialized=2, be the current -Wuninitialized.
Have another option to detect variables which are set but their values are not
used (this was in one of the -Wuninitialized bugs and has been asked before).
The EDG front-end implements this option.
Thanks,
Andrew Pinski