From: David Edelsohn <dje.gcc@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>, Iain Sandoe <iain@sandoe.co.uk>,
"libstdc++" <libstdc++@gcc.gnu.org>,
GCC Patches <gcc-patches@gcc.gnu.org>,
"CHIGOT, CLEMENT" <clement.chigot@atos.net>
Subject: Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T
Date: Fri, 30 Apr 2021 16:18:20 -0400 [thread overview]
Message-ID: <CAGWvnympmW4Z7Z0va1D8pxYH_dziQDuVx-j10UXO8+OMswP3Fg@mail.gmail.com> (raw)
In-Reply-To: <20210430193129.GC3008@redhat.com>
On Fri, Apr 30, 2021 at 3:31 PM Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On 29/04/21 16:06 -0400, David Edelsohn wrote:
> >On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely <jwakely@redhat.com> wrote:
> >>
> >> On 06/01/21 19:41 -0500, David Edelsohn wrote:
> >> >Thanks for clarifying the issue.
> >> >
> >> >As you implicitly point out, GCC knows the type of INT64 and defines
> >> >the macro __INT64_TYPE__ . The revised code can use that directly,
> >> >such as:
> >> >
> >> >#if defined(_GLIBCXX_HAVE_INT64_T_LONG) \
> >> > || defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
> >> > typedef __INT64_TYPE__ streamoff;
> >> > #elif defined(_GLIBCXX_HAVE_INT64_T)
> >> > typedef int64_t streamoff;
> >> > #else
> >> > typedef long long streamoff;
> >> > #endif
> >> >
> >> >Are there any additional issues not addressed by that approach, other
> >> >than possible further simplification?
> >>
> >> That avoids the ABI break that Jakub pointed out. But I think we can
> >> simplify it further, as in the attached patch.
> >>
> >> This uses __INT64_TYPE__ if that's defined, and long long otherwise. I
> >> think that should be equivalent in all practical cases (I can imagine
> >> some strange target where __INT64_TYPE__ is defined by the compiler,
> >> but int64_t isn't defined when the configure checks look for it, and
> >> so the current code would use long long and with my patch would use
> >> __INT64_TYPE__ which could be long ... but I think in practice that's
> >> unlikely. It was probably more likely in older releases where the
> >> configure test would have been done with -std=gnu++98 and so int64_t
> >> might not have been declared by libc's <stdint.h>, but if that was the
> >> case then any ABI break it caused happened years ago.
> >
> >Hi, Jonathan
> >
> >Polite ping.
> >
> >Now that GCC 11.1 has been released, can this patch be applied to
> >libstdc++? As I replied at the time to Jakub's concerns, both Clang
> >(since 3.0.0) and ICC (since at least 16.0.0) have defined
> >__INT64_TYPE__ .
>
> Pushed to trunk after testing on x86_64-linux and powerpc-aix.
Hi, Jonathan
Thanks very much! It's very helpful to remove the multilib differences.
I'll follow up about the int128 change in a separate email.
Thanks, David
prev parent reply other threads:[~2021-04-30 20:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 18:38 David Edelsohn
2021-01-06 18:55 ` Marc Glisse
2021-01-06 19:11 ` David Edelsohn
2021-01-06 19:37 ` Jakub Jelinek
2021-01-06 21:20 ` David Edelsohn
2021-01-06 21:41 ` Jakub Jelinek
2021-01-06 23:01 ` David Edelsohn
2021-01-06 23:39 ` Jakub Jelinek
2021-01-06 23:45 ` Jakub Jelinek
2021-01-07 0:41 ` David Edelsohn
2021-01-08 18:37 ` Jonathan Wakely
2021-01-08 18:52 ` Jakub Jelinek
2021-01-08 20:35 ` David Edelsohn
2021-04-29 20:06 ` David Edelsohn
2021-04-29 20:23 ` Jonathan Wakely
2021-04-30 19:31 ` Jonathan Wakely
2021-04-30 20:18 ` David Edelsohn [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=CAGWvnympmW4Z7Z0va1D8pxYH_dziQDuVx-j10UXO8+OMswP3Fg@mail.gmail.com \
--to=dje.gcc@gmail.com \
--cc=clement.chigot@atos.net \
--cc=gcc-patches@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
--cc=jakub@redhat.com \
--cc=jwakely@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).