[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2019-09-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2018-03-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2018-03-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Martin Sebor changed: What|Removed |Added Known to fail|7.0 |7.3.0, 8.0 --- Comment #10 from Martin Se

[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2017-01-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #9 from Martin Sebor --- Thanks for the reference. The strcmp(s, s) (and likewise memcmp(p, p, n)) case in bug 65452 is different because unlike this one, strcmp doesn't change the arrays pointed to by its arguments (which are also n

[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2017-01-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #8 from Marek Polacek --- For strcpy(s, s) see Bug 65452, which also contains a patch for -Wsame-arguments.

[Bug c/60256] No -Wuninitialized warning for strcpy copying to self

2016-12-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-04-16 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #6 from Manuel López-Ibáñez --- (In reply to Marek Polacek from comment #5) > We call c_fully_fold on strcpy (s, s);, and because this CALL_EXPR is > tcc_vl_exp, we call fold () on it. fold () then via fold_call_expr -> ... > calls f

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-04-16 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #5 from Marek Polacek --- We call c_fully_fold on strcpy (s, s);, and because this CALL_EXPR is tcc_vl_exp, we call fold () on it. fold () then via fold_call_expr -> ... calls fold_builtin_strcpy and that hits /* If SRC and DEST ar

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-04-16 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comment

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-04-16 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-02-17 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #2 from Andrew Pinski --- Well that is because strcpy(s,s) is optimized away as it is a nop.

[Bug c/60256] No -Wuninitialized warning for strcpy

2014-02-17 Thread chengniansun at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256 --- Comment #1 from Chengnian Sun --- If the call is to a user-defined function, then gcc warns. I cannot see why "strcpy" is special. $: cat s.c extern void p(const char*); void f(void) { char* s; p(s); } $: gcc-trunk -Wuninitialized s.c -c