aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 266ce0d..5af7fb6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-22 DJ Delorie <dj@redhat.com>
+
+ * c-common.c (c_common_type_for_mode): Pass the mode's precision
+ to make_[un]signed_type, not the mode itself.
+
2005-02-22 Kazu Hirata <kazu@cs.umass.edu>
* cfg.c (cached_make_edge): Call make_edge if edge cache is
diff --git a/gcc/c-common.c b/gcc/c-common.c
index a4dfdd8..39868e8 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1606,10 +1606,14 @@ c_common_type_for_mode (enum machine_mode mode, int unsignedp)
return void_type_node;
if (mode == TYPE_MODE (build_pointer_type (char_type_node)))
- return unsignedp ? make_unsigned_type (mode) : make_signed_type (mode);
+ return (unsignedp
+ ? make_unsigned_type (GET_MODE_PRECISION (mode))
+ : make_signed_type (GET_MODE_PRECISION (mode)));
if (mode == TYPE_MODE (build_pointer_type (integer_type_node)))
- return unsignedp ? make_unsigned_type (mode) : make_signed_type (mode);
+ return (unsignedp
+ ? make_unsigned_type (GET_MODE_PRECISION (mode))
+ : make_signed_type (GET_MODE_PRECISION (mode)));
if (COMPLEX_MODE_P (mode))
{