diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-11-18 14:52:03 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-11-18 14:52:03 +0000 |
commit | 9439e9a1a4aed9382d459eab247958671ea5a30d (patch) | |
tree | bbf1b784a6f03f045b5a0765d5dccfb9df0eab5a /gcc/cp/semantics.c | |
parent | 7c5efc1206d99472b0a1615b9da8f31cd849014b (diff) | |
download | gcc-9439e9a1a4aed9382d459eab247958671ea5a30d.zip gcc-9439e9a1a4aed9382d459eab247958671ea5a30d.tar.gz gcc-9439e9a1a4aed9382d459eab247958671ea5a30d.tar.bz2 |
c-common.c, [...]: Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
gcc/c-family/
* c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
tree_low_cst (..., 0) with tree_to_shwi throughout.
gcc/c/
* c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
throughout.
gcc/cp/
* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
gcc/go/
* gofrontend/expressions.cc: Replace tree_low_cst (..., 0) with
tree_to_shwi throughout.
gcc/java/
* class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
throughout.
gcc/objc/
* objc-next-runtime-abi-02.c: Replace tree_low_cst (..., 0) with
tree_to_shwi throughout.
gcc/
* builtins.c, cilk-common.c, config/aarch64/aarch64.c,
config/alpha/alpha.c, config/arm/arm.c, config/c6x/predicates.md,
config/i386/i386.c, config/ia64/predicates.md, config/s390/s390.c,
coverage.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h,
fold-const.c, gimple-fold.c, godump.c, ipa-prop.c, omp-low.c,
predict.c, rtlanal.c, sdbout.c, stmt.c, stor-layout.c, targhooks.c,
tree-cfg.c, tree-data-ref.c, tree-inline.c, tree-ssa-forwprop.c,
tree-ssa-loop-prefetch.c, tree-ssa-phiopt.c, tree-ssa-sccvn.c,
tree-ssa-strlen.c, tree-stdarg.c, tree-vect-data-refs.c,
tree-vect-patterns.c, tree.c, tree.h, var-tracking.c, varasm.c:
Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
From-SVN: r204959
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 781d373..dce2b37 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -8611,7 +8611,7 @@ cxx_eval_array_reference (const constexpr_call *call, tree t, *non_constant_p = true; return t; } - i = tree_low_cst (index, 0); + i = tree_to_shwi (index); if (TREE_CODE (ary) == CONSTRUCTOR) return (*CONSTRUCTOR_ELTS (ary))[i].value; else if (elem_nchars == 1) @@ -8726,8 +8726,8 @@ cxx_eval_bit_field_ref (const constexpr_call *call, tree t, TREE_OPERAND (t, 1), TREE_OPERAND (t, 2)); start = TREE_OPERAND (t, 2); - istart = tree_low_cst (start, 0); - isize = tree_low_cst (TREE_OPERAND (t, 1), 0); + istart = tree_to_shwi (start); + isize = tree_to_shwi (TREE_OPERAND (t, 1)); utype = TREE_TYPE (t); if (!TYPE_UNSIGNED (utype)) utype = build_nonstandard_integer_type (TYPE_PRECISION (utype), 1); @@ -8742,8 +8742,8 @@ cxx_eval_bit_field_ref (const constexpr_call *call, tree t, && tree_fits_shwi_p (bitpos) && tree_fits_shwi_p (DECL_SIZE (field))) { - HOST_WIDE_INT bit = tree_low_cst (bitpos, 0); - HOST_WIDE_INT sz = tree_low_cst (DECL_SIZE (field), 0); + HOST_WIDE_INT bit = tree_to_shwi (bitpos); + HOST_WIDE_INT sz = tree_to_shwi (DECL_SIZE (field)); HOST_WIDE_INT shift; if (bit >= istart && bit + sz <= istart + isize) { @@ -8900,7 +8900,7 @@ cxx_eval_vec_init_1 (const constexpr_call *call, tree atype, tree init, bool *non_constant_p, bool *overflow_p) { tree elttype = TREE_TYPE (atype); - int max = tree_low_cst (array_type_nelts (atype), 0); + int max = tree_to_shwi (array_type_nelts (atype)); vec<constructor_elt, va_gc> *n; vec_alloc (n, max + 1); bool pre_init = false; @@ -9119,9 +9119,9 @@ cxx_fold_indirect_ref (location_t loc, tree type, tree op0, bool *empty_base) && (same_type_ignoring_top_level_qualifiers_p (type, TREE_TYPE (op00type)))) { - HOST_WIDE_INT offset = tree_low_cst (op01, 0); + HOST_WIDE_INT offset = tree_to_shwi (op01); tree part_width = TYPE_SIZE (type); - unsigned HOST_WIDE_INT part_widthi = tree_low_cst (part_width, 0)/BITS_PER_UNIT; + unsigned HOST_WIDE_INT part_widthi = tree_to_shwi (part_width)/BITS_PER_UNIT; unsigned HOST_WIDE_INT indexi = offset * BITS_PER_UNIT; tree index = bitsize_int (indexi); |