aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-02-22 15:10:45 -0500
committerDJ Delorie <dj@gcc.gnu.org>2005-02-22 15:10:45 -0500
commit19b3ffbcaf816207be65b1ffb237810fe4ee0be0 (patch)
tree42950f80393cc1ef4c33e7efb62c3520395a0efd /gcc/c-common.c
parent118ca7d014b362b4d3c4417650d8031cde97b508 (diff)
downloadgcc-19b3ffbcaf816207be65b1ffb237810fe4ee0be0.zip
gcc-19b3ffbcaf816207be65b1ffb237810fe4ee0be0.tar.gz
gcc-19b3ffbcaf816207be65b1ffb237810fe4ee0be0.tar.bz2
c-common.c (c_common_type_for_mode): Pass the mode's precision to make_[un]signed_type, not the mode itself.
* c-common.c (c_common_type_for_mode): Pass the mode's precision to make_[un]signed_type, not the mode itself. From-SVN: r95412
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c8
1 files changed, 6 insertions, 2 deletions
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))
{