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/c-decl.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/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index a2cd9cb..871592a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3295,8 +3295,9 @@ check_bitfield_type_and_width (tree *type, tree *width, const char *orig_name) w = tree_low_cst (*width, 1); if (TREE_CODE (*type) == ENUMERAL_TYPE - && (w < min_precision (TYPE_MIN_VALUE (*type), TREE_UNSIGNED (*type)) - || w < min_precision (TYPE_MAX_VALUE (*type), TREE_UNSIGNED (*type)))) + && (w < min_precision (TYPE_MIN_VALUE (*type), TYPE_UNSIGNED (*type)) + || w < min_precision (TYPE_MAX_VALUE (*type), + TYPE_UNSIGNED (*type)))) warning ("`%s' is narrower than values of its type", name); } @@ -4910,7 +4911,7 @@ xref_tag (enum tree_code code, tree name) TYPE_MODE (ref) = TYPE_MODE (unsigned_type_node); TYPE_ALIGN (ref) = TYPE_ALIGN (unsigned_type_node); TYPE_USER_ALIGN (ref) = 0; - TREE_UNSIGNED (ref) = 1; + TYPE_UNSIGNED (ref) = 1; TYPE_PRECISION (ref) = TYPE_PRECISION (unsigned_type_node); TYPE_MIN_VALUE (ref) = TYPE_MIN_VALUE (unsigned_type_node); TYPE_MAX_VALUE (ref) = TYPE_MAX_VALUE (unsigned_type_node); @@ -5427,7 +5428,7 @@ finish_enum (tree enumtype, tree values, tree attributes) TYPE_MIN_VALUE (enumtype) = minnode; TYPE_MAX_VALUE (enumtype) = maxnode; TYPE_PRECISION (enumtype) = precision; - TREE_UNSIGNED (enumtype) = unsign; + TYPE_UNSIGNED (enumtype) = unsign; TYPE_SIZE (enumtype) = 0; layout_type (enumtype); @@ -5479,7 +5480,7 @@ finish_enum (tree enumtype, tree values, tree attributes) TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype); TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype); TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype); - TREE_UNSIGNED (tem) = TREE_UNSIGNED (enumtype); + TYPE_UNSIGNED (tem) = TYPE_UNSIGNED (enumtype); } /* Finish debugging output for this type. */ @@ -5551,7 +5552,7 @@ build_enumerator (tree name, tree value) TYPE_PRECISION (integer_type_node)), (TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node) - && TREE_UNSIGNED (type))); + && TYPE_UNSIGNED (type))); decl = build_decl (CONST_DECL, name, type); DECL_INITIAL (decl) = convert (type, value); @@ -5770,7 +5771,7 @@ start_function (tree declspecs, tree declarator, tree attributes) if (c_promoting_integer_type_p (restype)) { /* It retains unsignedness if not really getting wider. */ - if (TREE_UNSIGNED (restype) + if (TYPE_UNSIGNED (restype) && (TYPE_PRECISION (restype) == TYPE_PRECISION (integer_type_node))) restype = unsigned_type_node; |