diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 2 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 2 |
5 files changed, 12 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 082327e..0d69bda 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2017-10-10 Richard Sandiford <richard.sandiford@linaro.org> + + * cvt.c (ignore_overflows): Use wi::to_wide when + operating on trees as wide_ints. + * decl.c (check_array_designated_initializer): Likewise. + * mangle.c (write_integer_cst): Likewise. + * semantics.c (cp_finish_omp_clause_depend_sink): Likewise. + 2017-10-10 Nathan Sidwell <nathan@acm.org> * name-lookup.c (set_global_binding): Don't deal with STAT_HACK. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index a3bd4a1..d82293b 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -582,7 +582,7 @@ ignore_overflows (tree expr, tree orig) { gcc_assert (!TREE_OVERFLOW (orig)); /* Ensure constant sharing. */ - expr = wide_int_to_tree (TREE_TYPE (expr), expr); + expr = wide_int_to_tree (TREE_TYPE (expr), wi::to_wide (expr)); } return expr; } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0e70bb5..5a03055 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5298,7 +5298,7 @@ check_array_designated_initializer (constructor_elt *ce, == INTEGER_CST)) { /* A C99 designator is OK if it matches the current index. */ - if (wi::eq_p (ce_index, index)) + if (wi::to_wide (ce_index) == index) return true; else sorry ("non-trivial designated initializers not supported"); diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 6046906..64397cd 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1725,7 +1725,7 @@ write_integer_cst (const tree cst) type = c_common_signed_or_unsigned_type (1, TREE_TYPE (cst)); base = build_int_cstu (type, chunk); - n = wide_int_to_tree (type, cst); + n = wide_int_to_tree (type, wi::to_wide (cst)); if (sign < 0) { diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index d96423f..77c71e7 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5761,7 +5761,7 @@ cp_finish_omp_clause_depend_sink (tree sink_clause) if (TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE) { tree offset = TREE_PURPOSE (t); - bool neg = wi::neg_p ((wide_int) offset); + bool neg = wi::neg_p (wi::to_wide (offset)); offset = fold_unary (ABS_EXPR, TREE_TYPE (offset), offset); decl = mark_rvalue_use (decl); decl = convert_from_reference (decl); |