This is the mail archive of the gcc@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: [using gcc book] 5.20 double-word integers


Hello again, everyone. I'm finishing up the last round of revisions so
that the _Using GCC_ manuscript can go out to the printer, which hopefully
will happen tomorrow.

Here's the first of a handful of last minute questions.


On Tue, 26 Aug 2003, Chris Devers wrote:

> On Tue, 26 Aug 2003, Gabriel Paubert wrote:
>
> > Finally, when rereading the whole "Double-word Integers" section,
> > it seems obvious that it was written before the existence of 64 bit
> > machines, in which registers are twice the size of an int, and often
> > use exactly the same instructions for 32 and 64 bit operations.
>
> In which case, it's yet another section that could really do with a
> complete rewrite from scratch to bring it more up to date.
>
> Barring that, I might just strengthen the note about how word length is
> sensitive to the hardware you're dealing with, and it may be necessary
> to refer to platform specific documentation for these things.

With that in mind, I've added a footnote to this section, as follows. The
only new material at the moment is the @footnote{...} comment after "64
bits", but to keep things in context here's the whole paragraph & header:

<excerpt>

@node Long Long
@section Double-Word Integers
@cindex @code{long long} data types
@cindex double-word arithmetic
@cindex multiprecision arithmetic
@cindex @code{LL} integer suffix
@cindex @code{ULL} integer suffix

ISO C99 supports data types for integers that are at least 64
bits@footnote{Note that, in practice, actual word lengths will depend on
the platform in question, and that as 64-bit processors continue to become
mainstream, longer word lengths are likely to become common.  Consult your
local documentation as necessary for details about word lengths on your
platform.} wide, and as an extension GCC supports them in C89 mode and in
C++.  Simply write @code{long long int} for a signed integer, or
@code{unsigned long long int} for an unsigned integer.  To make an integer
constant of type @code{long long int}, add the suffix @samp{LL} to the
integer.  To make an integer constant of type @code{unsigned long long
int}, add the suffix @samp{ULL} to the integer.

</excerpt>

Please let me know if this footnote validly summarizes the situation, or
if there's anything else that should be said. Also, I'm not sure if this
is the right term to attach the note to, but can't really think of a
better place to attach it. Suggestions welcome.



-- 
Chris Devers cdevers@pobox.com
http://devers.homeip.net:8080/

help, n.
A torrent of irrelevant information invoked by the F1 key.

    -- from _The Computer Contradictionary_, Stan Kelly-Bootle, 1995


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