public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kostas Savvidis <ksavvidis@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: 128-bit integer - nonsensical documentation?
Date: Wed, 26 Aug 2015 12:32:00 -0000	[thread overview]
Message-ID: <93EE7806-1082-4A59-B5FB-6758E0532049@gmail.com> (raw)
In-Reply-To: <CAH6eHdTumersYZtRi62uGVhjW+nxmCkXRC__bN1En2Q6shRa3w@mail.gmail.com>

I sense there is a consensus that
1) the 128bit integer is emulated emulated on 64-bit platforms, not available on 32-bit platforms, and is not native anywhere
2) the long long int is 64-bits everywhere so you can *NEVER* do what the document seems to suggest one *MIGHT* be able to do —  input a 128-bit constant

To me, this would justify rewriting the documentation.

My personal lament is that i still cannot find out anywhere if it is available on all 64-bit platforms or on intel only.

KS

> On Aug 26, 2015, at 3:22 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 
> On 26 August 2015 at 12:04, Kostas Savvidis wrote:
>> The online documentation contains the attached passage as part of the "C-Extensions” chapter. There are no actual machines which have an " integer mode wide enough to hold 128 bits” as the document puts it.
> 
> It's not talking about machine integers, it's talking about GCC
> integer modes. Several targets support that.
> 
>> This would be a harmless confusion if it didn’t go on to say “… long long integer less than 128 bits wide” (???!!!) Whereas in reality "long long int” is 64 bits everywhere i have seen.
> 
> 
> Read it more carefully, it says you can't express an integer constant
> of type __int128 on such platforms.
> 
> So you can't write __int128 i =
> 999999999999999999999999999999999999999999999999999999999999;

  reply	other threads:[~2015-08-26 12:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 11:04 Kostas Savvidis
2015-08-26 11:44 ` Jeffrey Walton
2015-08-26 12:13 ` David Brown
2015-08-26 16:02   ` Martin Sebor
2015-08-27  7:12     ` David Brown
2015-08-27  9:32       ` Jonathan Wakely
2015-08-27  9:42         ` Marc Glisse
2015-08-27  9:43           ` Jonathan Wakely
2015-08-27 15:09       ` Martin Sebor
2015-08-28  6:54         ` David Brown
2015-08-28 15:30           ` Martin Sebor
2015-08-26 12:22 ` Jonathan Wakely
2015-08-26 12:32   ` Kostas Savvidis [this message]
2015-08-26 12:39     ` Jonathan Wakely
2015-08-26 12:47       ` Jeffrey Walton
2015-08-26 12:47     ` David Brown
2015-08-26 12:48   ` Jeffrey Walton
2015-08-26 12:51     ` Marc Glisse

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=93EE7806-1082-4A59-B5FB-6758E0532049@gmail.com \
    --to=ksavvidis@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    /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).