From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: Richard Biener <rguenther@suse.de>, <gcc-patches@gcc.gnu.org>
Subject: Re: [RFC] HOST_WIDE_INT transition steps
Date: Tue, 20 May 2014 15:15:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1405201505570.29858@digraph.polyomino.org.uk> (raw)
In-Reply-To: <1768416.XG1yqiIQrU@polaris>
On Tue, 20 May 2014, Eric Botcazou wrote:
> > Make the code base easier to understand for newcomers. It's also a
> > documentation improvement (you see what a HOST_WIDE_INT really is),
> > alongside with [u]int64_t being less to type ...
>
> I personally find the abstraction and the separation with the other, more
> mundane types useful, but I guess that it's a matter of habit.
Whatever the abstraction is, HOST_WIDE_INT is a pretty poor name for it.
I think it's something like "integer type that is big enough to store a
target address / offset in bytes, or a target word", together with a sense
of "integer type big enough for certain constants and such that twice it
is big enough for other constants" (the latter being what wide-int should
enable eliminating eventually).
But I suspect HOST_WIDE_INT is used for lots of other things as well - and
for things for which 64 bits may not be enough (bit offsets, for example),
and for that matter int is used for things for which HOST_WIDE_INT would
be more appropriate (the length of a STRING_CST, for example). So while
there may be a meaningful abstraction somewhere in there, I don't think
the particular places that happen to use HOST_WIDE_INT are a very good
guide to where such an abstraction should be used - and don't think moving
to int64_t / uint64_t would actually lose information of use for cleaning
things up in future.
(HOST_WIDEST_INT should of course become intmax_t. It should also not be
used in any way that can affect code generation.)
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2014-05-20 15:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 12:45 Richard Biener
2014-05-19 18:55 ` Richard Sandiford
2014-05-20 7:20 ` Mikael Pettersson
2014-05-20 11:03 ` Eric Botcazou
2014-05-20 11:14 ` Richard Biener
2014-05-20 11:23 ` Eric Botcazou
2014-05-20 11:25 ` Richard Biener
2014-05-20 15:15 ` Joseph S. Myers [this message]
2014-05-22 11:24 ` Richard Sandiford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1405201505570.29858@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).