aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-04-01 03:50:43 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-03-31 22:50:43 -0500
commit8df83eae1ed8f8f7cfb653bdeb14f2b5071d7c4f (patch)
treecdd0771bc6e7a796038424b013a8a89e08667dea /gcc/ada
parentd9175b871cddac9b9d3c7216bf3a8f665539d782 (diff)
downloadgcc-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/ada')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/decl.c16
-rw-r--r--gcc/ada/trans.c12
-rw-r--r--gcc/ada/utils.c18
-rw-r--r--gcc/ada/utils2.c2
5 files changed, 33 insertions, 24 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 26c8ef5..5fe33e4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * decl.c (gnat_to_gnu_entity, make_type_from_size):
+ Use TYPE_UNSIGNED, not TREE_UNSIGNED.
+ * trans.c (tree_transform, convert_with_check): Likewise.
+ * utils.c (gnat_signed_or_unsigned_type): Likewise.
+ (build_vms_descriptor, unchecked_convert): Likewise.
+ * utils2.c (nonbinary_modular_operation): Likewise.
+
2004-03-29 Javier Miranda <miranda@gnat.com>
* checks.adb (Null_Exclusion_Static_Checks): New subprogram
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index bb79af7..c7b66c7 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -1221,7 +1221,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
= TYPE_MODULAR_P (gnu_type)
? gnu_high : TYPE_MAX_VALUE (gnu_type);
TYPE_PRECISION (gnu_subtype) = esize;
- TREE_UNSIGNED (gnu_subtype) = 1;
+ TYPE_UNSIGNED (gnu_subtype) = 1;
TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1;
TYPE_PACKED_ARRAY_TYPE_P (gnu_subtype)
= Is_Packed_Array_Type (gnat_entity);
@@ -1299,8 +1299,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* This should be an unsigned type if the lower bound is constant
and non-negative or if the base type is unsigned; a signed type
otherwise. */
- TREE_UNSIGNED (gnu_type)
- = (TREE_UNSIGNED (TREE_TYPE (gnu_type))
+ TYPE_UNSIGNED (gnu_type)
+ = (TYPE_UNSIGNED (TREE_TYPE (gnu_type))
|| (TREE_CODE (TYPE_MIN_VALUE (gnu_type)) == INTEGER_CST
&& TREE_INT_CST_HIGH (TYPE_MIN_VALUE (gnu_type)) >= 0)
|| TYPE_BIASED_REPRESENTATION_P (gnu_type)
@@ -1806,7 +1806,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
else if (TREE_CODE (gnu_high) == INTEGER_CST
&& TREE_OVERFLOW (gnu_high))
gnu_high = gnu_max;
- else if (TREE_UNSIGNED (gnu_base_subtype)
+ else if (TYPE_UNSIGNED (gnu_base_subtype)
|| TREE_CODE (gnu_high) == INTEGER_CST)
gnu_high = size_binop (MAX_EXPR, gnu_max, gnu_high);
else
@@ -2081,8 +2081,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
= TYPE_MAX_VALUE (gnu_inner_type);
TYPE_PRECISION (gnu_subtype)
= TYPE_PRECISION (gnu_inner_type);
- TREE_UNSIGNED (gnu_subtype)
- = TREE_UNSIGNED (gnu_inner_type);
+ TYPE_UNSIGNED (gnu_subtype)
+ = TYPE_UNSIGNED (gnu_inner_type);
TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1;
layout_type (gnu_subtype);
@@ -6010,8 +6010,8 @@ make_type_from_size (tree type, tree size_tree, int biased_p)
= ((TREE_CODE (type) == INTEGER_TYPE
&& TYPE_BIASED_REPRESENTATION_P (type))
|| biased_p);
- TREE_UNSIGNED (new_type)
- = TREE_UNSIGNED (type) | TYPE_BIASED_REPRESENTATION_P (new_type);
+ TYPE_UNSIGNED (new_type)
+ = TYPE_UNSIGNED (type) | TYPE_BIASED_REPRESENTATION_P (new_type);
TYPE_RM_SIZE_INT (new_type) = bitsize_int (size);
return new_type;
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index dc34b72..efa99fe 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -1886,10 +1886,10 @@ tree_transform (Node_Id gnat_node)
/* For right shifts, the type says what kind of shift to do,
so we may need to choose a different type. */
if (Nkind (gnat_node) == N_Op_Shift_Right
- && ! TREE_UNSIGNED (gnu_type))
+ && ! TYPE_UNSIGNED (gnu_type))
gnu_type = gnat_unsigned_type (gnu_type);
else if (Nkind (gnat_node) == N_Op_Shift_Right_Arithmetic
- && TREE_UNSIGNED (gnu_type))
+ && TYPE_UNSIGNED (gnu_type))
gnu_type = gnat_signed_type (gnu_type);
if (gnu_type != gnu_result_type)
@@ -4729,17 +4729,17 @@ convert_with_check (Entity_Id gnat_type,
/* Convert the lower bounds to signed types, so we're sure we're
comparing them properly. Likewise, convert the upper bounds
to unsigned types. */
- if (INTEGRAL_TYPE_P (gnu_in_basetype) && TREE_UNSIGNED (gnu_in_basetype))
+ if (INTEGRAL_TYPE_P (gnu_in_basetype) && TYPE_UNSIGNED (gnu_in_basetype))
gnu_in_lb = convert (gnat_signed_type (gnu_in_basetype), gnu_in_lb);
if (INTEGRAL_TYPE_P (gnu_in_basetype)
- && ! TREE_UNSIGNED (gnu_in_basetype))
+ && !TYPE_UNSIGNED (gnu_in_basetype))
gnu_in_ub = convert (gnat_unsigned_type (gnu_in_basetype), gnu_in_ub);
- if (INTEGRAL_TYPE_P (gnu_base_type) && TREE_UNSIGNED (gnu_base_type))
+ if (INTEGRAL_TYPE_P (gnu_base_type) && TYPE_UNSIGNED (gnu_base_type))
gnu_out_lb = convert (gnat_signed_type (gnu_base_type), gnu_out_lb);
- if (INTEGRAL_TYPE_P (gnu_base_type) && ! TREE_UNSIGNED (gnu_base_type))
+ if (INTEGRAL_TYPE_P (gnu_base_type) && !TYPE_UNSIGNED (gnu_base_type))
gnu_out_ub = convert (gnat_unsigned_type (gnu_base_type), gnu_out_ub);
/* Check each bound separately and only if the result bound
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 1c012fe..3fba0c0 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -2118,7 +2118,7 @@ gnat_signed_type (tree type_node)
tree
gnat_signed_or_unsigned_type (int unsignedp, tree type)
{
- if (! INTEGRAL_TYPE_P (type) || TREE_UNSIGNED (type) == unsignedp)
+ if (! INTEGRAL_TYPE_P (type) || TYPE_UNSIGNED (type) == unsignedp)
return type;
else
return gnat_type_for_size (TYPE_PRECISION (type), unsignedp);
@@ -2355,19 +2355,19 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
switch (GET_MODE_BITSIZE (TYPE_MODE (type)))
{
case 8:
- dtype = TREE_UNSIGNED (type) ? 2 : 6;
+ dtype = TYPE_UNSIGNED (type) ? 2 : 6;
break;
case 16:
- dtype = TREE_UNSIGNED (type) ? 3 : 7;
+ dtype = TYPE_UNSIGNED (type) ? 3 : 7;
break;
case 32:
- dtype = TREE_UNSIGNED (type) ? 4 : 8;
+ dtype = TYPE_UNSIGNED (type) ? 4 : 8;
break;
case 64:
- dtype = TREE_UNSIGNED (type) ? 5 : 9;
+ dtype = TYPE_UNSIGNED (type) ? 5 : 9;
break;
case 128:
- dtype = TREE_UNSIGNED (type) ? 25 : 26;
+ dtype = TYPE_UNSIGNED (type) ? 25 : 26;
break;
}
break;
@@ -3388,15 +3388,15 @@ unchecked_convert (tree type, tree expr, int notrunc_p)
&& 0 != compare_tree_int (TYPE_RM_SIZE (type),
GET_MODE_BITSIZE (TYPE_MODE (type)))
&& ! (INTEGRAL_TYPE_P (etype)
- && TREE_UNSIGNED (type) == TREE_UNSIGNED (etype)
+ && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (etype)
&& operand_equal_p (TYPE_RM_SIZE (type),
(TYPE_RM_SIZE (etype) != 0
? TYPE_RM_SIZE (etype) : TYPE_SIZE (etype)),
0))
- && ! (TREE_UNSIGNED (type) && TREE_UNSIGNED (etype)))
+ && ! (TYPE_UNSIGNED (type) && TYPE_UNSIGNED (etype)))
{
tree base_type = gnat_type_for_mode (TYPE_MODE (type),
- TREE_UNSIGNED (type));
+ TYPE_UNSIGNED (type));
tree shift_expr
= convert (base_type,
size_binop (MINUS_EXPR,
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index a0d33db..453841b 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -512,7 +512,7 @@ nonbinary_modular_operation (enum tree_code op_code,
/* If our type is the wrong signedness or isn't wide enough, make a new
type and convert both our operands to it. */
if (TYPE_PRECISION (op_type) < precision
- || TREE_UNSIGNED (op_type) != unsignedp)
+ || TYPE_UNSIGNED (op_type) != unsignedp)
{
/* Copy the node so we ensure it can be modified to make it modular. */
op_type = copy_node (gnat_type_for_size (precision, unsignedp));