------- Comment #3 from dhill at clusterresources dot com  2009-02-05 21:48 
-------
Note that the warning is correctly reported in older versions of the compiler.

The following example is from gcc 3.2.3


$ gcc -O -W um3.c
um3.c: In function `main':
um3.c:5: warning: `J' might be used uninitialized in this function


$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)

$ cat um3.c
#include <stdio.h>

main()
{
char *J;

if (rand())
  J = NULL;

printf("\ntest %s\n",J);
}


-- 


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

Reply via email to