This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada files now checked in
- To: dewar at gnat dot com
- Subject: Re: Ada files now checked in
- From: Diego Novillo <dnovillo at redhat dot com>
- Date: Sat, 6 Oct 2001 16:50:21 -0400
- Cc: zack at codesourcery 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: <20011006204014.60CF9F28AE@nile.gnat.com>
On Sat, 06 Oct 2001, dewar@gnat.com wrote:
> <<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
> uninitialized (tree-ssa.c:analyze_rdefs).
> >>
>
> And just to be clear, flags the occurrence that is troublesome?
It displays this message:
-----------------------------------------------------------------------------
$ cat foo.c
main()
{
int a, b;
a = b + 4;
}
$ gcc -Wuninitialized -ftree-ssa foo.c -O -c
foo.c: In function `main':
foo.c:3: warning: `b' is used uninitialized in this function
-----------------------------------------------------------------------------