------- Comment #3 from muntyan at tamu dot edu  2007-01-23 03:09 -------
Is it really quite as 22456? That bug is about variable used for initializing
itself, and really strange do-nothing code, while this one is straightforward
use of unitialized variable:

int main (void)
{
  int i, foo;
  for (i = 0; i < 10; i++)
  {
    if (i > 5)
      foo = 8;
    printf ("%d\n", foo); /* uninitialized foo is printed six times */
  }
}

or this one:

#include <stdio.h>

int func (void)
{
    return 0;
}

int main (void)
{
    int foo;

    if (func ())
        foo = 8;

    printf ("%d\n", foo);
    return 0;
}

Sorry for pain if this really a duplicate.


-- 

muntyan at tamu dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |muntyan at tamu dot edu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30542

Reply via email to