]> git.ipfire.org Git - thirdparty/gcc.git/commit
* builtins.c (unterminated_array): Pass in c_strlen_data * to
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Sep 2018 16:06:09 +0000 (16:06 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Sep 2018 16:06:09 +0000 (16:06 +0000)
commit2b84b289e3b58332351642cb58bf197fa60b1387
tree797b7466a6780a7072c673f67d18031bf368e779
parent02f4837b36ef01133bff3552f545e69fa3e41c8a
* builtins.c (unterminated_array): Pass in c_strlen_data * to
c_strlen rather than just a tree *.
(c_strlen): Change NONSTR argument to a c_strlen_data pointer.
Update recursive calls appropriately.  If caller did not provide a
suitable data pointer, create a local one.  When a non-terminated
string is discovered, bubble up information about the string via the
c_strlen_data object.
* builtins.h (c_strlen): Update prototype.
(c_strlen_data): New structure.
* gimple-fold.c (get_range_strlen): Update calls to c_strlen.
For a type 2 call, if c_strlen indicates a non-terminated string
use the length of the non-terminated string.
(gimple_fold_builtin_stpcpy): Update calls to c_strlen.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264712 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.h
gcc/gimple-fold.c