]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/tree-ssa-strlen.c
PR middle-end/93646 - confusing -Wstringop-truncation on strncat where -Wstringop...
authorMartin Sebor <msebor@redhat.com>
Wed, 12 Feb 2020 20:53:49 +0000 (13:53 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 12 Feb 2020 20:53:49 +0000 (13:53 -0700)
commit0a0de9636d29a378961e4c98a129421229918052
tree72425aa1d84b0615bc2cade753c1030ec7aff55e
parent37462a131c528d0980915d98567361aa9396b030
PR middle-end/93646 - confusing -Wstringop-truncation on strncat where -Wstringop-overflow is expected

gcc/ChangeLog:

PR middle-end/93646
* tree-ssa-strlen.c (handle_builtin_stxncpy): Rename...
(handle_builtin_stxncpy_strncat): ...to this.  Change first argument.
Issue only -Wstringop-overflow strncat, never -Wstringop-truncation.
(strlen_check_and_optimize_call): Adjust callee name.

gcc/testsuite/ChangeLog:

PR middle-end/93646
* gcc.dg/Wstringop-overflow-31.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstringop-overflow-31.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c