diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 266ce0d190d..5af7fb69356 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-02-22 DJ Delorie + + * 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 * 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 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)) {