diff options
author | Rafael Avila de Espindola <espindola@google.com> | 2007-05-14 14:37:17 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@gcc.gnu.org> | 2007-05-14 14:37:17 +0000 |
commit | ca5ba2a3ea97efc7f23622d759bc3a885a12662b (patch) | |
tree | a28ec44b83ed223ca40fabdb746511c19bbbc130 /gcc/fold-const.c | |
parent | a4242737202af64a394f5271c06b8be1979cbcfb (diff) | |
download | gcc-ca5ba2a3ea97efc7f23622d759bc3a885a12662b.zip gcc-ca5ba2a3ea97efc7f23622d759bc3a885a12662b.tar.gz gcc-ca5ba2a3ea97efc7f23622d759bc3a885a12662b.tar.bz2 |
c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead of c_common_unsigned_type.
gcc/
* c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
instead of c_common_unsigned_type.
(c_common_unsigned_type): Remove.
(shorten_compare): Use c_common_signed_or_unsigned_type instead of
c_common_unsigned_type.
(c_common_nodes_and_builtins): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-common.h (c_common_unsigned_type): Remove.
* c-decl.c (grokdeclarator): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-format.c (check_format_types): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
c_common_unsigned_type.
* convert.c (convert_to_integer): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
* expmed.c (make_tree): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
* fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
(build_range_check): Likewise.
(fold_unary): Likewise.
(fold_binary): Likewise.
(fold_ternary): Likewise.
* langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* langhooks.h (lang_hooks_for_types): Remove unsigned_type.
* tree.c (get_unsigned_type): New.
(unsigned_type_for): Use get_unsigned_type instead of
lang_hooks.types.unsigned_type
gcc/ada
* misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
gcc/cp
* cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* decl.c (grokdeclarator): Use unsigned_type_for instead of
c_common_unsigned_type.
gcc/fortran
* f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
instead of gfc_unsigned_type.
* trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
gfc_unsigned_type.
* trans-types.c (gfc_unsigned_type): Remove.
* trans-types.h (gfc_unsigned_type): Remove.
gcc/java
* expr.c (build_java_binop): Use unsigned_type_for instead of
java_unsigned_type.
* java-tree.h (java_unsigned_type): Remove.
* lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* typeck.c (java_unsigned_type): Remove.
gcc/treelang
* treetree.c (tree_lang_unsigned_type): Remove.
(LANG_HOOKS_UNSIGNED_TYPE): Remove.
From-SVN: r124715
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ba17d46..c4c6edc 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1411,7 +1411,7 @@ fold_negate_expr (tree t) { tree ntype = TYPE_UNSIGNED (type) ? lang_hooks.types.signed_type (type) - : lang_hooks.types.unsigned_type (type); + : unsigned_type_for (type); tree temp = fold_convert (ntype, TREE_OPERAND (t, 0)); temp = fold_build2 (RSHIFT_EXPR, ntype, temp, op1); return fold_convert (type, temp); @@ -4352,7 +4352,7 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high) { if (! TYPE_UNSIGNED (etype)) { - etype = lang_hooks.types.unsigned_type (etype); + etype = unsigned_type_for (etype); high = fold_convert (etype, high); exp = fold_convert (etype, exp); } @@ -4420,7 +4420,7 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high) /* Check if (unsigned) INT_MAX + 1 == (unsigned) INT_MIN for the type in question, as we rely on this here. */ - utype = lang_hooks.types.unsigned_type (etype); + utype = unsigned_type_for (etype); maxv = fold_convert (utype, TYPE_MAX_VALUE (etype)); maxv = range_binop (PLUS_EXPR, NULL_TREE, maxv, 1, integer_one_node, 1); @@ -7798,7 +7798,7 @@ fold_unary (enum tree_code code, tree type, tree op0) && (LOAD_EXTEND_OP (TYPE_MODE (TREE_TYPE (and0))) == ZERO_EXTEND)) { - tree uns = lang_hooks.types.unsigned_type (TREE_TYPE (and0)); + tree uns = unsigned_type_for (TREE_TYPE (and0)); and0 = fold_convert (uns, and0); and1 = fold_convert (uns, and1); } @@ -11220,7 +11220,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) || TREE_CODE (arg0) == ROUND_MOD_EXPR) && integer_pow2p (TREE_OPERAND (arg0, 1))) { - tree newtype = lang_hooks.types.unsigned_type (TREE_TYPE (arg0)); + tree newtype = unsigned_type_for (TREE_TYPE (arg0)); tree newmod = fold_build2 (TREE_CODE (arg0), newtype, fold_convert (newtype, TREE_OPERAND (arg0, 0)), @@ -12329,7 +12329,7 @@ fold_ternary (enum tree_code code, tree type, tree op0, tree op1, tree op2) else if ((TREE_INT_CST_HIGH (arg1) & mask_hi) == 0 && (TREE_INT_CST_LOW (arg1) & mask_lo) == 0) { - tem_type = lang_hooks.types.unsigned_type (TREE_TYPE (tem)); + tem_type = unsigned_type_for (TREE_TYPE (tem)); tem = fold_convert (tem_type, tem); } else |