aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2001-09-07 15:14:43 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-09-07 15:14:43 -0700
commit4a063bec6e3b164cf467ee99e423f9271177be86 (patch)
tree356b8d1f15ff4a7a73cc72dae36b54c788ad92b5 /gcc/c-common.c
parent2fd7f0c1f8f3efcedf2a466b638a0d95a7398582 (diff)
downloadgcc-4a063bec6e3b164cf467ee99e423f9271177be86.zip
gcc-4a063bec6e3b164cf467ee99e423f9271177be86.tar.gz
gcc-4a063bec6e3b164cf467ee99e423f9271177be86.tar.bz2
c-common.c (signed_or_unsigned_type): Handle machine mode types which have no corresponding C type.
* c-common.c (signed_or_unsigned_type): Handle machine mode types which have no corresponding C type. * fold_const.c (target_isinf,target_isnan,target_negative): Update the representation of 64-bit doubles to work with 64-bit ints. From-SVN: r45479
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 84a9262..72b1417 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2071,6 +2071,20 @@ signed_or_unsigned_type (unsignedp, type)
if (TYPE_PRECISION (type) == TYPE_PRECISION (widest_integer_literal_type_node))
return (unsignedp ? widest_unsigned_literal_type_node
: widest_integer_literal_type_node);
+
+#if HOST_BITS_PER_WIDE_INT >= 64
+ if (TYPE_PRECISION (type) == TYPE_PRECISION (intTI_type_node))
+ return unsignedp ? unsigned_intTI_type_node : intTI_type_node;
+#endif
+ if (TYPE_PRECISION (type) == TYPE_PRECISION (intDI_type_node))
+ return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
+ if (TYPE_PRECISION (type) == TYPE_PRECISION (intSI_type_node))
+ return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
+ if (TYPE_PRECISION (type) == TYPE_PRECISION (intHI_type_node))
+ return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
+ if (TYPE_PRECISION (type) == TYPE_PRECISION (intQI_type_node))
+ return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
+
return type;
}