public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Make __int128 meet integer-class requirements [PR 96042]
Date: Mon, 24 Aug 2020 09:52:23 +0100	[thread overview]
Message-ID: <CAH6eHdRu8AdUDLC2WbtA3DtPW=bB+i0AoQqjC1Suud9uH+yLfQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.23.453.2008221655360.7483@stedding.saclay.inria.fr>

On Sat, 22 Aug 2020 at 16:01, Marc Glisse <marc.glisse@inria.fr> wrote:
>
> On Sat, 22 Aug 2020, Jonathan Wakely via Gcc-patches wrote:
>
> > On Sat, 22 Aug 2020 at 13:13, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> >>
> >> On Sat, 22 Aug 2020 at 10:52, Marc Glisse wrote:
> >>> is there a particular reason to handle only __int128 this way, and not all
> >>> the non-standard integer types? It looks like it would be a bit simpler to
> >>> avoid a special case.
> >>
> >> I have no objection to doing it for all of them, it just wasn't
> >> necessary to solve the immediate problem that the library now uses
> >> __int128 even when integral<__int128> is false. (Hmm, or is size_t  an
> >> alias for __int20 on one arch, which would mean we do use it?)
> >
> > Oh I remember why I didn't do that now. I did actually want to do it
> > that way initially.
> >
> > The macros like __GLIBCXX_TYPE_INT_N_0 are not defined in strict mode,
> > so we have no generic way to name those types.
>
> IIRC, those macros were introduced specifically to help libstdc++. If
> libstdc++ wants them defined in different circumstances, it should be fine
> to change the condition from "!flag_iso || int_n_data[i].bitsize ==
> POINTER_SIZE" to whatever you need.

Hmm, IIRC the purpose of the patch series adding those macros was to
make it possible to use __int20 on a target that needed that. The
macros were added so that libstdc++ support could be enabled, to
support that target.

So IIRC the primary purpose was to improve that target, not to help
libstdc++. Allowing libstdc++ to use those types was just a necessary
step for improving the target. But I can check with DJ.

      reply	other threads:[~2020-08-24  8:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 16:00 Jonathan Wakely
2020-08-19 19:36 ` Jonathan Wakely
2020-08-20 18:44   ` Jonathan Wakely
2020-08-22  9:50 ` Marc Glisse
2020-08-22 12:13   ` Jonathan Wakely
2020-08-22 12:17     ` JeanHeyd Meneide
2020-08-22 12:32       ` Jonathan Wakely
2020-08-22 12:37     ` Jonathan Wakely
2020-08-22 15:00       ` Marc Glisse
2020-08-24  8:52         ` 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='CAH6eHdRu8AdUDLC2WbtA3DtPW=bB+i0AoQqjC1Suud9uH+yLfQ@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).