summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-22 20:10:45 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-22 20:10:45 +0000
commit61b9b73cf809725264e1b7721bbcec6bb88ab536 (patch)
tree42950f80393cc1ef4c33e7efb62c3520395a0efd /gcc/c-common.c
parent0081c87563ff74aba8f38e64c77b4bbba15453f7 (diff)
downloadgcc-61b9b73cf809725264e1b7721bbcec6bb88ab536.tar.gz
* c-common.c (c_common_type_for_mode): Pass the mode's precision
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
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 a4dfdd84136..39868e88659 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))
{