This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c_common_type_for_mode: pass precision, not mode


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]