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]

Re: Ada files now checked in


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
-----------------------------------------------------------------------------


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