builtins.c (compute_objsize): Add an argument and set it to offset into destination.
authorMartin Sebor <msebor@redhat.com>
Wed, 11 Dec 2019 19:50:43 +0000 (19:50 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 11 Dec 2019 19:50:43 +0000 (12:50 -0700)
commitf7d86b5ca830ca95899ec5e1585359f9baf19238
tree2ccb64ec581e259d048fcc8de48cee51fbf37494
parentc7f5b4eddd8b11383074876e45863ae6b92a1357
builtins.c (compute_objsize): Add an argument and set it to offset into destination.

gcc/ChangeLog:

* builtins.c (compute_objsize): Add an argument and set it to offset
into destination.
* builtins.h (compute_objsize): Add an argument.
* tree-object-size.c (addr_object_size): Add an argument and set it
to offset into destination.
(compute_builtin_object_size): Same.
* tree-object-size.h (compute_builtin_object_size): Add an argument.
* tree-ssa-strlen.c (get_addr_stridx): Add an argument and set it
to offset into destination.
(maybe_warn_overflow): New function.
(handle_store): Call maybe_warn_overflow to issue warnings.

gcc/testsuite/ChangeLog:

* c-c++-common/Wstringop-overflow-2.c: Adjust text of expected messages.
* g++.dg/warn/Wstringop-overflow-3.C: Same.
* gcc.dg/Wstringop-overflow-17.c: Same.

From-SVN: r279248
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C
gcc/testsuite/gcc.dg/Wstringop-overflow-17.c
gcc/tree-object-size.c
gcc/tree-object-size.h
gcc/tree-ssa-strlen.c