https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-12-24
CC| |msebor at gcc dot gnu.org
Summary|No -Wuninitialized warning |No -Wuninitialized warning
|for strcpy |for strcpy copying to self
Ever confirmed|0 |1
Known to fail| |4.9.3, 5.3.0, 6.1.0, 7.0
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
I'll confirm this on the grounds that a strcpy(s, s) call is invalid because it
violates the strict aliasing rules (strcpy arguments are declared restrict).
The invalid strcpy(s, s) call should also be diagnosed by -Wrestrict.
The test case seems contrived but I think this type of a bug can easily be
lurking in more complicated code.