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: Tom Tromey <tromey at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: 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>, "Joseph S. Myers" <joseph at codesourcery dot com>, Mike Stump <mikestump at comcast dot net>, Jay K <jay dot krell at cornell dot edu>
- Date: Fri, 15 Jun 2012 13:13:36 -0600
- 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>
>>>>> "Eric" == Eric Botcazou <ebotcazou@adacore.com> writes:
>> It's true that this is a pedantic violation; but the point here is that
>> there is no practical barrier to using 'long long'. This code has been
>> in the tree since 2007; so if there is some issue with it, it ought to
>> have surfaced by now.
Eric> The whole compiler is written using HOST_WIDE_INT and the like, so
Eric> using some external code that managed to escape a proper review
Eric> before being merged in order to justify an incorrect usage is IMO
Eric> short-sighted, to say the least.
Not interested in trading barbs about it. Still, I'll find it in me to
be partly tongue in cheek.
I don't understand what the code being external, or the review, has to
do with anything. This code is compiled with the same host compiler as
everything else.
HOST_WIDE_INT is also not very persuasive to me. We did many things in
the past that became obsolete as compilers matured. You can still
occasionally find workarounds for old compiler bugs in GNU source; but
that doesn't make them relevant.
Maybe strict adherence to C90 gives some benefit, but I don't really
know what that would be. Of course, I'd rather we -- not GCC obviously,
it is going another route, but the rest of the toolchain -- burn some
bridges and move to C99. I think we deserve a 13 year old standard.
Tom