https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
I'm going to close this as WONTFIX.  The -Wrestrict warning seems good enough
for the unlikely strcpy(s, s) case, and the much more probable test case below
does get diagnosed by -Wuninitialized:

$ cat pr60256.c && gcc -O2 -S -Wall pr60256.c
void f (char *d)
{
  char* s;
  strcpy (d, s);
}
pr60256.c: In function ā€˜fā€™:
pr60256.c:6:3: warning: ā€˜sā€™ is used uninitialized in this function
[-Wuninitialized]
    6 |   strcpy (d, s);
      |   ^~~~~~~~~~~~~

Reply via email to