This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c/22297] [4.3/4.4/4.5/4.6 Regression] missing uninitialized warning (builtin functions)


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


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