From 8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 1 Apr 2004 03:50:43 +0000 Subject: 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 --- gcc/convert.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gcc/convert.c') diff --git a/gcc/convert.c b/gcc/convert.c index 397c542..dcab84a 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -397,7 +397,7 @@ convert_to_integer (tree type, tree expr) conversion necessitates an explicit sign-extension. In the signed-to-unsigned case the high-order bits have to be cleared. */ - if (TREE_UNSIGNED (type) != TREE_UNSIGNED (TREE_TYPE (expr)) + if (TYPE_UNSIGNED (type) != TYPE_UNSIGNED (TREE_TYPE (expr)) && (TYPE_PRECISION (TREE_TYPE (expr)) != GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr))))) code = CONVERT_EXPR; @@ -415,7 +415,7 @@ convert_to_integer (tree type, tree expr) || outprec != GET_MODE_BITSIZE (TYPE_MODE (type))) return build1 (NOP_EXPR, type, convert (lang_hooks.types.type_for_mode - (TYPE_MODE (type), TREE_UNSIGNED (type)), + (TYPE_MODE (type), TYPE_UNSIGNED (type)), expr)); /* Here detect when we can distribute the truncation down past some @@ -456,7 +456,7 @@ convert_to_integer (tree type, tree expr) the target type is unsigned. */ if (TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST && tree_int_cst_sgn (TREE_OPERAND (expr, 1)) >= 0 - && TREE_UNSIGNED (type) + && TYPE_UNSIGNED (type) && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST) { /* If shift count is less than the width of the truncated type, @@ -498,8 +498,8 @@ convert_to_integer (tree type, tree expr) && outprec >= TYPE_PRECISION (TREE_TYPE (arg1)) /* If signedness of arg0 and arg1 don't match, we can't necessarily find a type to compare them in. */ - && (TREE_UNSIGNED (TREE_TYPE (arg0)) - == TREE_UNSIGNED (TREE_TYPE (arg1)))) + && (TYPE_UNSIGNED (TREE_TYPE (arg0)) + == TYPE_UNSIGNED (TREE_TYPE (arg1)))) goto trunc1; break; } @@ -527,7 +527,7 @@ convert_to_integer (tree type, tree expr) so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) typex = lang_hooks.types.type_for_size - (TYPE_PRECISION (typex), TREE_UNSIGNED (typex)); + (TYPE_PRECISION (typex), TYPE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. @@ -545,9 +545,9 @@ convert_to_integer (tree type, tree expr) signed-overflow undefinedness. And we may need to do it as unsigned if we truncate to the original size. */ - if (TREE_UNSIGNED (TREE_TYPE (expr)) - || (TREE_UNSIGNED (TREE_TYPE (arg0)) - && (TREE_UNSIGNED (TREE_TYPE (arg1)) + if (TYPE_UNSIGNED (TREE_TYPE (expr)) + || (TYPE_UNSIGNED (TREE_TYPE (arg0)) + && (TYPE_UNSIGNED (TREE_TYPE (arg1)) || ex_form == LSHIFT_EXPR || ex_form == RSHIFT_EXPR || ex_form == LROTATE_EXPR @@ -576,7 +576,7 @@ convert_to_integer (tree type, tree expr) so use an integer type that will hold the values. */ if (TREE_CODE (typex) == ENUMERAL_TYPE) typex = lang_hooks.types.type_for_size - (TYPE_PRECISION (typex), TREE_UNSIGNED (typex)); + (TYPE_PRECISION (typex), TYPE_UNSIGNED (typex)); /* But now perhaps TYPEX is as wide as INPREC. In that case, do nothing special here. @@ -585,7 +585,7 @@ convert_to_integer (tree type, tree expr) { /* Don't do unsigned arithmetic where signed was wanted, or vice versa. */ - if (TREE_UNSIGNED (TREE_TYPE (expr))) + if (TYPE_UNSIGNED (TREE_TYPE (expr))) typex = lang_hooks.types.unsigned_type (typex); else typex = lang_hooks.types.signed_type (typex); -- cgit v1.1