OSDN Git Service

* c-common.c (c_common_type_for_mode): Pass the mode's precision
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Feb 2005 20:10:45 +0000 (20:10 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Feb 2005 20:10:45 +0000 (20:10 +0000)
to make_[un]signed_type, not the mode itself.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95412 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.c

index 266ce0d..5af7fb6 100644 (file)
@@ -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
index a4dfdd8..39868e8 100644 (file)
@@ -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))
     {