[Bug middle-end/93646] confusing -Wstringop-truncation on strncat where -Wstringop-overflow is expected

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 12 20:55:00 GMT 2020


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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:0a0de9636d29a378961e4c98a129421229918052

commit r10-6600-g0a0de9636d29a378961e4c98a129421229918052
Author: Martin Sebor <msebor@redhat.com>
Date:   Wed Feb 12 13:53:49 2020 -0700

    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.


More information about the Gcc-bugs mailing list