diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-06-17 07:50:57 -0400 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-06-17 07:50:57 -0400 |
commit | b9e67f2840ce0d8859d96e7f8df8fe9584af5eba (patch) | |
tree | ed3b7284ff15c802583f6409b9c71b3739642d15 /gcc/builtins.h | |
parent | 1957047ed1c94bf17cf993a2b1866965f493ba87 (diff) | |
parent | 56638b9b1853666f575928f8baf17f70e4ed3517 (diff) | |
download | gcc-b9e67f2840ce0d8859d96e7f8df8fe9584af5eba.zip gcc-b9e67f2840ce0d8859d96e7f8df8fe9584af5eba.tar.gz gcc-b9e67f2840ce0d8859d96e7f8df8fe9584af5eba.tar.bz2 |
Merge from trunk at:
commit 56638b9b1853666f575928f8baf17f70e4ed3517
Author: GCC Administrator <gccadmin@gcc.gnu.org>
Date: Wed Jun 17 00:16:36 2020 +0000
Daily bump.
Diffstat (limited to 'gcc/builtins.h')
-rw-r--r-- | gcc/builtins.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/builtins.h b/gcc/builtins.h index 7d8b9cd..8b812ce 100644 --- a/gcc/builtins.h +++ b/gcc/builtins.h @@ -152,11 +152,39 @@ extern bool target_char_cst_p (tree t, char *p); extern internal_fn associated_internal_fn (tree); extern internal_fn replacement_internal_fn (gcall *); -bool check_nul_terminated_array (tree, tree, tree = NULL_TREE); +extern bool check_nul_terminated_array (tree, tree, tree = NULL_TREE); extern void warn_string_no_nul (location_t, const char *, tree, tree); extern tree unterminated_array (tree, tree * = NULL, bool * = NULL); extern bool builtin_with_linkage_p (tree); -extern bool check_access (tree, tree, tree, tree, tree, tree, tree); +/* Describes a reference to an object used in an access. */ +struct access_ref +{ + access_ref (): ref () + { + /* Set to valid. */ + offrng[0] = offrng[1] = 0; + /* Invalidate. */ + sizrng[0] = sizrng[1] = -1; + } + + /* Reference to the object. */ + tree ref; + + /* Range of offsets into and sizes of the object(s). */ + offset_int offrng[2]; + offset_int sizrng[2]; +}; + +/* Describes a pair of references used in an access by built-in + functions like memcpy. */ +struct access_data +{ + /* Destination and source of the access. */ + access_ref dst, src; +}; + +extern bool check_access (tree, tree, tree, tree, tree, tree, tree, + bool = true, const access_data * = NULL); #endif /* GCC_BUILTINS_H */ |