This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c_common_type_for_mode: pass precision, not mode
- From: Zack Weinberg <zack at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 Dec 2004 19:54:19 -0800
- Subject: Re: c_common_type_for_mode: pass precision, not mode
- References: <200412160346.iBG3kv9q011598@greed.delorie.com>
DJ Delorie <dj@redhat.com> writes:
> I found this with an internal port, so if someone suggests a port
> with a pointer mode that doesn't match any "normal" integer type
> modes I can test it officially.
Well, what's there is clearly wrong - make_(un)signed_type do not take
mode enumerators. I assume this code is unreachable in ports with
"normal" Pmode?
Unfortunately, there are no ports in the current tree that use
anything other than HI, SI, or DImode for Pmode.
> I'm also unsure whether the mode's bitsize or precision is the
> appropriate value to pass. Consider, for example, using a
> fractional int mode for Pmode.
It's used - directly - to set TYPE_PRECISION, which makes me think
that what you have here is correct, but I could be wrong.
zw