This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: long long availability in host compiler (Re: constant that doesn't fit in 32bits in alpha.c)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Pedro Alves <palves at redhat dot com>, gcc-patches at gcc dot gnu dot org, Tristan Gingold <gingold at adacore dot com>, Richard Henderson <rth at redhat dot com>, Mike Stump <mikestump at comcast dot net>, Jay K <jay dot krell at cornell dot edu>
- Date: Fri, 15 Jun 2012 19:58:23 +0000 (UTC)
- Subject: Re: long long availability in host compiler (Re: constant that doesn't fit in 32bits in alpha.c)
- References: <COL101-W6492A808E1395EB8CB5B76E6F00@phx.gbl> <201206151148.50360.ebotcazou@adacore.com> <87lijosb4x.fsf@fleche.redhat.com> <201206152053.31356.ebotcazou@adacore.com> <87aa04s80v.fsf@fleche.redhat.com>
On Fri, 15 Jun 2012, Tom Tromey wrote:
> HOST_WIDE_INT is also not very persuasive to me. We did many things in
Although HOST_WIDE_INT is used for too many different things (see Diego's
and my architectural goals documents for more discussion, specifically
"HOST_WIDE_INT, HOST_WIDEST_INT and associated concepts" at the bottom of
the conventions document), I don't think we should use "long long"
directly in the compiler (except in limited places such as hwint.h
selecting a type to use for some abstraction) simply because it's not the
right abstraction for saying what the requirements are on the type being
used. If the requirement is "at least 64 bits", int_fast64_t would be
better, for example (gnulib can generate a stdint.h where the host doesn't
have it). If it's "big enough for the target address space" then
HOST_WIDE_INT is what we have at present. If it's "fast on the host, but
size doesn't matter", then HOST_WIDEST_FAST_INT.
--
Joseph S. Myers
joseph@codesourcery.com