public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>
Cc: Jakub Jelinek <jakub@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: Use __extension__ instead of diagnostic pragmas (was: Suppress pedantic warnings about __int128)
Date: Fri, 16 Jul 2021 15:39:29 +0100	[thread overview]
Message-ID: <CACb0b4kT0+3dnzhLhC0zDipZRnxVRCv+whVYRoSB9A+5_5KbJw@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4krr4qP1LFmdVsJK9+iSZY-5eV9Ai_JCCV0UgqC3NSdRA@mail.gmail.com>

On Fri, 16 Jul 2021 at 14:02, Jonathan Wakely wrote:
>
> On Fri, 16 Jul 2021 at 12:29, Jonathan Wakely wrote:
> > Hmm, in fact it seems that we can just use the __uint128_t typedef
> > instead, which doesn't give a pedwarn:
> >
> >   using __rep = __uint128_t;
> >
> > Is that typedef always available if __int128 is? There's a comment in
> > gcc/c-family/c-common.c that I don't understand:
> >
> > #if HOST_BITS_PER_WIDE_INT >= 64
> >   /* Note that this is different than the __int128 type that's part of
> >      the generic __intN support.  */
> >   if (targetm.scalar_mode_supported_p (TImode))
> >     lang_hooks.decls.pushdecl (build_decl (UNKNOWN_LOCATION,
> >                        TYPE_DECL,
> >                        get_identifier ("__int128_t"),
> >                        intTI_type_node));
> > #endif
> >
> > They are the same type in C++, so what is "different"? Is it possible
> > for __int128 to be different from a TImode integer?
>
> As discussed on IRC, I'm going to add a configure check that __int128
> and __int128_t are the same, and similarly for the unsigned versions.
> That will allow us to use __int128_t and __uint128_t to avoid the
> warnings (assuming GCC doesn't change to warn consistently for the
> non-standard typedefs as well as the non-standard types).
>
> For now, I'll just use __extension__ consistently everywhere. I'm
> testing the attached patch that does that.

Pushed to trunk now.


      reply	other threads:[~2021-07-16 14:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  7:41 [committed] libstdc++: Suppress pedantic warnings about __int128 Jonathan Wakely
2021-07-16  8:27 ` Jakub Jelinek
2021-07-16  8:29   ` Jakub Jelinek
2021-07-16  8:38     ` Jonathan Wakely
2021-07-16  8:39       ` Jonathan Wakely
2021-07-16 11:29         ` Jonathan Wakely
2021-07-16 13:02           ` [PATCH] libstdc++: Use __extension__ instead of diagnostic pragmas (was: Suppress pedantic warnings about __int128) Jonathan Wakely
2021-07-16 14:39             ` Jonathan Wakely [this message]

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=CACb0b4kT0+3dnzhLhC0zDipZRnxVRCv+whVYRoSB9A+5_5KbJw@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /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).