diff options
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -5323,6 +5323,15 @@ ptrofftype_p (tree type) && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (sizetype)); } +/* Return OFF converted to a pointer offset type suitable as offset for + POINTER_PLUS_EXPR. Use location LOC for this conversion. */ +static inline tree +convert_to_ptrofftype_loc (location_t loc, tree off) +{ + return fold_convert_loc (loc, sizetype, off); +} +#define convert_to_ptrofftype(t) convert_to_ptrofftype_loc (UNKNOWN_LOCATION, t) + /* Build and fold a POINTER_PLUS_EXPR at LOC offsetting PTR by OFF. */ static inline tree fold_build_pointer_plus_loc (location_t loc, tree ptr, tree off) |