[Bug c/22297] [4.3/4.4/4.5/4.6 Regression] missing uninitialized warning (builtin functions)
nicola at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 19 22:06:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22297
Nicola Pero <nicola at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nicola at gcc dot gnu.org
Known to work| |4.6.0
Resolution| |FIXED
Target Milestone|4.3.6 |4.6.0
--- Comment #11 from Nicola Pero <nicola at gcc dot gnu.org> 2011-01-19 21:40:14 UTC ---
This works for me with GCC 4.6.0 --
[nicola@lampone ~]$ cat x.c
#include <string.h>
int g(char *);
int f(void)
{
char *s;
strcpy(s,s);
return g(s);
}
[nicola@lampone ~]$ gcc x.c -Wall -c -O2
x.c: In function ‘f’:
x.c:8:3: warning: ‘s’ is used uninitialized in this function [-Wuninitialized]
[nicola@lampone ~]$
The same doesn't work with GCC 4.1.2, where the same gcc command generates
no warnings at all.
So it looks like the problem has been fixed :-)
Thanks
More information about the Gcc-bugs
mailing list