public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: gcc-help <gcc-help@gcc.gnu.org>
Cc: David Brown <david@westcontrol.com>,
	Martin Sebor <msebor@gmail.com>,
		Kostas Savvidis <ksavvidis@gmail.com>
Subject: Re: 128-bit integer - nonsensical documentation?
Date: Thu, 27 Aug 2015 09:43:00 -0000	[thread overview]
Message-ID: <CAH6eHdT_fbvvuCrZU5FvU6GewMu1ADKAcdtxwyt6AcV25g6mDQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1508271137410.2005@laptop-mg.saclay.inria.fr>

On 27 August 2015 at 10:42, Marc Glisse wrote:
> On Thu, 27 Aug 2015, Jonathan Wakely wrote:
>
>>> Are you allowed to include typedefs for uint128_t and int128_t in
>>> <stdint.h>, or would that also only be allowed if it is a proper
>>> extended integer?
>>
>>
>> Those names are not in the namespace reserved for the implementation,
>> so doing that would cause this valid code to fail to compile:
>>
>> #include <stdint.h>
>> typedef struct { } uint128_t;
>> int main() { }
>
>
> C11
> 7.31 Future library directions
> 7.31.10 Integer types <stdint.h>
> Typedef names beginning with int or uint and ending with _t may be added to
> the types defined in the <stdint.h> header.
>
> 7.20.1.1 also gives restrictions on the semantics of any type called
> uintN_t.
>
> I would interpret that as making your program non-portable, if not broken.

Agreed.

I thought only POSIX reserved the _t suffixes, I didn't know about 7.31.10

  reply	other threads:[~2015-08-27  9:43 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 [this message]
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
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=CAH6eHdT_fbvvuCrZU5FvU6GewMu1ADKAcdtxwyt6AcV25g6mDQ@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=david@westcontrol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=ksavvidis@gmail.com \
    --cc=msebor@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).