This is the mail archive of the
mailing list for the GCC project.
Re: Ada files now checked in
- To: Zack Weinberg <zack at codesourcery dot com>
- Subject: Re: Ada files now checked in
- From: Diego Novillo <dnovillo at redhat dot com>
- Date: Sat, 6 Oct 2001 16:35:35 -0400
- Cc: dewar at gnat dot com, bosch at gnat dot com, gcc at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu
- Organization: Red Hat Canada
- References: <20011006163945.70459F28AE@nile.gnat.com> <20011006100159.S9432@codesourcery.com>
On Sat, 06 Oct 2001, Zack Weinberg wrote:
> On Sat, Oct 06, 2001 at 12:39:45PM -0400, firstname.lastname@example.org wrote:
> > <<Completely agreed, and there is work in progress to improve these
> > warnings.
> > >>
> > Ah, that's *very* interesting, can you tell me more? In particular that
> > news means I can probably retire the work on trying to do this in the
> > GNAT front end (we already catch quite a bit there, but do not yet catch
> > cases involving conditionals).
> I'm not sure if anyone has actually *proposed* this, but code is being
> written to do data flow analysis on whole-function trees; since trees
> retain much more information about user variables and source
> positions, it would be possible to tag the exact location that the
> compiler thought an uninitialized value could reach.
> You might want to check out the ast-optimizer-branch.
Yes, this is already implemented in the ast-optimizer-branch.
The compiler computes reaching definitions for local variables
and emits a warning for every variable that might be used