diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-04-01 03:50:43 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-03-31 22:50:43 -0500 |
commit | 8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f (patch) | |
tree | cdd0771bc6e7a796038424b013a8a89e08667dea /gcc/tree.c | |
parent | d9175b871cddac9b9d3c7216bf3a8f665539d782 (diff) | |
download | gcc-8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f.zip gcc-8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f.tar.gz gcc-8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f.tar.bz2 |
builtins.c, [...]: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.
* builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c:
Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.
* c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise.
* calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise.
* expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise.
* optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise.
* tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise.
* config/mips/mips.c, config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise.
* stor-layout.c (layout_type, case COMPLEX_TYPE): Test for
REAL_TYPE, not INTEGER_TYPE.
(layout_type, case VECTOR_TYPE): Simplify code.
* tree.c (build_vector_type_for_mode): Remove dup unsigned setting.
* tree.h: Update comments.
(STRIP_NOPS): Use TYPE_UNSIGNED.
(TYPE_UNSIGNED): New macro.
(TYPE_TRAP_SIGNED): Remove now redundant check.
(SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED.
* cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* cp/class.c (check_bitfield_decl): Likewise.
* cp/cvt.c (type_promotes_to): Likewise.
* cp/decl.c (finish_enum): Likewise.
* cp/mangle.c (write_builtin_type): Likewise.
* cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
* cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise.
(build_binary_op): Likewise.
* f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
(ffecom_expr_): Likewise.
* java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
* treelang/treetree.c (tree_lang_signed_or_unsigned_type):
Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* ada/decl.c (gnat_to_gnu_entity, make_type_from_size):
Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* ada/trans.c (tree_transform, convert_with_check): Likewise.
* ada/utils.c (gnat_signed_or_unsigned_type): Likewise.
(build_vms_descriptor, unchecked_convert): Likewise.
* ada/utils2.c (nonbinary_modular_operation): Likewise.
From-SVN: r80287
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 35 |
1 files changed, 17 insertions, 18 deletions
@@ -499,7 +499,7 @@ real_value_from_int_cst (tree type, tree i) real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode, TREE_INT_CST_LOW (i), TREE_INT_CST_HIGH (i), - TREE_UNSIGNED (TREE_TYPE (i))); + TYPE_UNSIGNED (TREE_TYPE (i))); return d; } @@ -630,7 +630,7 @@ integer_all_onesp (tree expr) || TREE_CONSTANT_OVERFLOW (expr)) return 0; - uns = TREE_UNSIGNED (TREE_TYPE (expr)); + uns = TYPE_UNSIGNED (TREE_TYPE (expr)); if (!uns) return (TREE_INT_CST_LOW (expr) == ~(unsigned HOST_WIDE_INT) 0 && TREE_INT_CST_HIGH (expr) == -1); @@ -3473,7 +3473,7 @@ tree_int_cst_lt (tree t1, tree t2) if (t1 == t2) return 0; - if (TREE_UNSIGNED (TREE_TYPE (t1)) != TREE_UNSIGNED (TREE_TYPE (t2))) + if (TYPE_UNSIGNED (TREE_TYPE (t1)) != TYPE_UNSIGNED (TREE_TYPE (t2))) { int t1_sgn = tree_int_cst_sgn (t1); int t2_sgn = tree_int_cst_sgn (t2); @@ -3486,7 +3486,7 @@ tree_int_cst_lt (tree t1, tree t2) unsigned just in case one of them would overflow a signed type. */ } - else if (! TREE_UNSIGNED (TREE_TYPE (t1))) + else if (!TYPE_UNSIGNED (TREE_TYPE (t1))) return INT_CST_LT (t1, t2); return INT_CST_LT_UNSIGNED (t1, t2); @@ -3519,7 +3519,7 @@ host_integerp (tree t, int pos) && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) >= 0) || (! pos && TREE_INT_CST_HIGH (t) == -1 && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0 - && ! TREE_UNSIGNED (TREE_TYPE (t))) + && !TYPE_UNSIGNED (TREE_TYPE (t))) || (pos && TREE_INT_CST_HIGH (t) == 0))); } @@ -3562,7 +3562,7 @@ tree_int_cst_sgn (tree t) { if (TREE_INT_CST_LOW (t) == 0 && TREE_INT_CST_HIGH (t) == 0) return 0; - else if (TREE_UNSIGNED (TREE_TYPE (t))) + else if (TYPE_UNSIGNED (TREE_TYPE (t))) return 1; else if (TREE_INT_CST_HIGH (t) < 0) return -1; @@ -4364,7 +4364,7 @@ get_unwidened (tree op, tree for_type) int uns = (for_type != 0 && for_type != type && final_prec > TYPE_PRECISION (type) - && TREE_UNSIGNED (type)); + && TYPE_UNSIGNED (type)); tree win = op; while (TREE_CODE (op) == NOP_EXPR) @@ -4394,11 +4394,11 @@ get_unwidened (tree op, tree for_type) { if (! uns || final_prec <= TYPE_PRECISION (TREE_TYPE (op))) win = op; - /* TREE_UNSIGNED says whether this is a zero-extension. + /* TYPE_UNSIGNED says whether this is a zero-extension. Let's avoid computing it if it does not affect WIN and if UNS will not be needed again. */ if ((uns || TREE_CODE (op) == NOP_EXPR) - && TREE_UNSIGNED (TREE_TYPE (op))) + && TYPE_UNSIGNED (TREE_TYPE (op))) { uns = 1; win = op; @@ -4416,7 +4416,7 @@ get_unwidened (tree op, tree for_type) unsigned int innerprec = tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1); int unsignedp = (TREE_UNSIGNED (TREE_OPERAND (op, 1)) - || TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); + || TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); type = lang_hooks.types.type_for_size (innerprec, unsignedp); /* We can get this structure field in the narrowest type it fits in. @@ -4471,11 +4471,11 @@ get_narrower (tree op, int *unsignedp_ptr) /* An extension: the outermost one can be stripped, but remember whether it is zero or sign extension. */ if (first) - uns = TREE_UNSIGNED (TREE_TYPE (op)); + uns = TYPE_UNSIGNED (TREE_TYPE (op)); /* Otherwise, if a sign extension has been stripped, only sign extensions can now be stripped; if a zero extension has been stripped, only zero-extensions. */ - else if (uns != TREE_UNSIGNED (TREE_TYPE (op))) + else if (uns != TYPE_UNSIGNED (TREE_TYPE (op))) break; first = 0; } @@ -4484,7 +4484,7 @@ get_narrower (tree op, int *unsignedp_ptr) /* A change in nominal type can always be stripped, but we must preserve the unsignedness. */ if (first) - uns = TREE_UNSIGNED (TREE_TYPE (op)); + uns = TYPE_UNSIGNED (TREE_TYPE (op)); first = 0; op = TREE_OPERAND (op, 0); } @@ -4501,7 +4501,7 @@ get_narrower (tree op, int *unsignedp_ptr) unsigned HOST_WIDE_INT innerprec = tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1); int unsignedp = (TREE_UNSIGNED (TREE_OPERAND (op, 1)) - || TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); + || TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); tree type = lang_hooks.types.type_for_size (innerprec, unsignedp); /* We can get this structure field in a narrower type that fits it, @@ -4542,10 +4542,10 @@ int_fits_type_p (tree c, tree type) /* Perform some generic filtering first, which may allow making a decision even if the bounds are not constant. First, negative integers never fit in unsigned types, */ - if ((TREE_UNSIGNED (type) && tree_int_cst_sgn (c) < 0) + if ((TYPE_UNSIGNED (type) && tree_int_cst_sgn (c) < 0) /* Also, unsigned integers with top bit set never fit signed types. */ - || (! TREE_UNSIGNED (type) - && TREE_UNSIGNED (TREE_TYPE (c)) && tree_int_cst_msb (c))) + || (! TYPE_UNSIGNED (type) + && TYPE_UNSIGNED (TREE_TYPE (c)) && tree_int_cst_msb (c))) return 0; /* If at least one bound of the type is a constant integer, we can check @@ -5356,7 +5356,6 @@ build_vector_type_for_mode (tree innertype, enum machine_mode mode) t = make_node (VECTOR_TYPE); TREE_TYPE (t) = innertype; TYPE_MODE (t) = mode; - TREE_UNSIGNED (t) = TREE_UNSIGNED (innertype); finish_vector_type (t); return t; } |