[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Martin Sebor --- Presumably fixed by r261515.
[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Known to work||9.0 Known to fail|9.0 | --- Comment #5 from Martin Sebor --- Patch committed into trunk in r261515.
[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 --- Comment #4 from Martin Sebor --- Author: msebor Date: Tue Jun 12 17:14:31 2018 New Revision: 261515 URL: https://gcc.gnu.org/viewcvs?rev=261515=gcc=rev Log: PR c/85931 - -Wsizeof-pointer-memaccess for strncpy with size of source gcc/c-family/ChangeLog: PR c/85931 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when sizeof source and destination yields the same value. gcc/ChangeLog: PR c/85931 * fold-const.c (operand_equal_p): Handle SAVE_EXPR. gcc/testsuite/ChangeLog: PR c/85931 * gcc.dg/Wstringop-truncation-3.c: New test. Added: trunk/gcc/testsuite/gcc.dg/Wstringop-truncation-3.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-warn.c trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog
[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #3 from Martin Sebor --- Patch: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01698.html
[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-05-29 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Martin Sebor --- Testing a patch.
[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Keywords||diagnostic See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=85602 --- Comment #1 from Martin Sebor --- See also bug 85602 for another related instance of the warning, this one for strncat.