HOST_WIDE_INT vs HOST_WIDEST_INT (was Re: x-files must die: rather too much at once)
Zack Weinberg
zackw@Stanford.EDU
Sat Mar 10 10:25:00 GMT 2001
On Sat, Mar 10, 2001 at 08:45:07AM -0500, Kaveh R. Ghazi wrote:
> > Why do we have both HOST_WIDE_INT and HOST_WIDEST_INT? It's rather
> > confusing. This patch may use a different definition for
> > HOST_WIDE_INT than the previous, in certain corner cases; if I
> > understand the semantics correctly - and I'm not saying I do - the
> > old behavior was in error.
>
> I was told HOST_WIDE_INT must never be wider than long for performance
> reasons. IIRC, at the time Jeff quoted some horrible slowdown figure
> when he tested setting HOST_WIDE_INT to long long.
>
> So to allow correct 64 bit handling in cpp, we decided to introduce
> HOST_WIDEST_INT . It will be "long long" if plain "long" isn't wide
> enough.
Thought it was something like that.
Maybe we should call them "long" and "intmax_t", then?
If sizeof(long) == sizeof(int), we presently make HOST_WIDE_INT be
int, but we could just use long all the time. That'd make a whole
bunch of junk disappear...
zw
More information about the Gcc-patches
mailing list