diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-18 14:51:10 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-18 14:51:10 +0000 |
commit | 35ec552a6349f5b8ef21996454de61a0649ae59a (patch) | |
tree | afc65126a85ed1aadac8e274f889137dc1baed2a /gcc/c-family | |
parent | 031a4cb6d2dc2e69d3723413323d228fac4bc0d2 (diff) | |
download | gcc-35ec552a6349f5b8ef21996454de61a0649ae59a.tar.gz |
gcc/ada/
* gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.
gcc/c-family/
* c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.
gcc/c/
* c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
throughout.
gcc/cp/
* error.c, init.c, parser.c, semantics.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.
gcc/go/
* gofrontend/expressions.cc: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.
gcc/java/
* class.c, expr.c: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.
gcc/
* builtins.c, config/alpha/alpha.c, config/c6x/predicates.md,
config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c,
config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c,
expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c,
gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c,
omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c,
stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c,
tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c,
tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c,
tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c,
tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c,
varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
throughout.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-ada-spec.c | 4 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 6 | ||||
-rw-r--r-- | gcc/c-family/c-format.c | 6 | ||||
-rw-r--r-- | gcc/c-family/c-pretty-print.c | 4 |
5 files changed, 15 insertions, 10 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 9f884b6c845..fde985328cd 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + + * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace + host_integerp (..., 0) with tree_fits_shwi_p throughout. + 2013-11-15 Aldy Hernandez <aldyh@redhat.com> * c-cilkplus.c: New file. diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index 3f325e77098..6a5826b0a76 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -1813,7 +1813,7 @@ is_simple_enum (tree node) if (TREE_CODE (int_val) != INTEGER_CST) int_val = DECL_INITIAL (int_val); - if (!host_integerp (int_val, 0)) + if (!tree_fits_shwi_p (int_val)) return false; else if (TREE_INT_CST_LOW (int_val) != count) return false; @@ -2205,7 +2205,7 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type, int spc, to generate the (0 .. -1) range for flexible array members. */ if (TREE_TYPE (node) == sizetype) node = fold_convert (ssizetype, node); - if (host_integerp (node, 0)) + if (tree_fits_shwi_p (node)) pp_wide_integer (buffer, TREE_INT_CST_LOW (node)); else if (host_integerp (node, 1)) pp_unsigned_wide_integer (buffer, TREE_INT_CST_LOW (node)); diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index d7d5cb20a17..d0fc1aafd6b 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -6999,7 +6999,7 @@ get_priority (tree args, bool is_destructor) arg = TREE_VALUE (args); arg = default_conversion (arg); - if (!host_integerp (arg, /*pos=*/0) + if (!tree_fits_shwi_p (arg) || !INTEGRAL_TYPE_P (TREE_TYPE (arg))) goto invalid; @@ -11243,14 +11243,14 @@ warn_for_sign_compare (location_t location, if (TREE_CODE (op1) == BIT_NOT_EXPR) op1 = c_common_get_narrower (TREE_OPERAND (op1, 0), &unsignedp1); - if (host_integerp (op0, 0) || host_integerp (op1, 0)) + if (tree_fits_shwi_p (op0) || tree_fits_shwi_p (op1)) { tree primop; HOST_WIDE_INT constant, mask; int unsignedp; unsigned int bits; - if (host_integerp (op0, 0)) + if (tree_fits_shwi_p (op0)) { primop = op1; unsignedp = unsignedp1; diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 99cae172a5b..d0c07e41354 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -1459,7 +1459,7 @@ check_format_arg (void *ctx, tree format_tree, res->number_non_literal++; return; } - if (!host_integerp (arg1, 0) + if (!tree_fits_shwi_p (arg1) || (offset = tree_low_cst (arg1, 0)) < 0) { res->number_non_literal++; @@ -1506,7 +1506,7 @@ check_format_arg (void *ctx, tree format_tree, return; } if (TREE_CODE (format_tree) == ARRAY_REF - && host_integerp (TREE_OPERAND (format_tree, 1), 0) + && tree_fits_shwi_p (TREE_OPERAND (format_tree, 1)) && (offset += tree_low_cst (TREE_OPERAND (format_tree, 1), 0)) >= 0) format_tree = TREE_OPERAND (format_tree, 0); if (TREE_CODE (format_tree) == VAR_DECL @@ -1537,7 +1537,7 @@ check_format_arg (void *ctx, tree format_tree, /* Variable length arrays can't be initialized. */ gcc_assert (TREE_CODE (array_size) == INTEGER_CST); - if (host_integerp (array_size, 0)) + if (tree_fits_shwi_p (array_size)) { HOST_WIDE_INT array_size_value = TREE_INT_CST_LOW (array_size); if (array_size_value > 0 diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 54ed5512cd4..fd4b8579959 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -586,7 +586,7 @@ c_pretty_printer::direct_abstract_declarator (tree t) tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (t)); tree type = TREE_TYPE (maxval); - if (host_integerp (maxval, 0)) + if (tree_fits_shwi_p (maxval)) pp_wide_integer (this, tree_low_cst (maxval, 0) + 1); else expression (fold_build2 (PLUS_EXPR, type, maxval, @@ -915,7 +915,7 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i) ? TYPE_CANONICAL (TREE_TYPE (i)) : TREE_TYPE (i); - if (host_integerp (i, 0)) + if (tree_fits_shwi_p (i)) pp_wide_integer (pp, TREE_INT_CST_LOW (i)); else if (host_integerp (i, 1)) pp_unsigned_wide_integer (pp, TREE_INT_CST_LOW (i)); |