public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: Marek Polacek <polacek@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	 "libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] c++: Implement __is_{nothrow_,}convertible [PR106784]
Date: Fri, 23 Sep 2022 15:40:23 +0100	[thread overview]
Message-ID: <CACb0b4niNgAfWpdzTaT1RTCUbFWdjF-VqO+wTyhGBSiD9w9Gwg@mail.gmail.com> (raw)
In-Reply-To: <b8712969-ec22-31e1-769a-6f7d900b742d@redhat.com>

On Thu, 22 Sept 2022 at 23:14, Jason Merrill wrote:
> On 9/22/22 09:39, Marek Polacek wrote:
> > This patch doesn't make libstdc++ use the new built-ins, but I had to
> > rename a class otherwise its name would clash with the new built-in.
>
> Sigh, that's going to be a hassle when comparing compiler versions on
> preprocessed code.

Good point. Clang has some gross hacks that we could consider. When it
sees a declaration that uses a built-in name, it disables the built-in
for the remainder of the translation unit. It does this precisely to
allow a new Clang to compile old std::lib headers where a built-in
like __is_assignable was used as a normal class template, not the
built-in (because no such built-in existed at the time the library
code was written). For us, this is only really a problem when
bisecting bugs and using a newer compiler to compile .ii files from
odler headers, but for Clang combining a new Clang with older
libstdc++ headers is a hard requirement (recall that when Clang was
first deployed to macOS it had to consume the system's libstdc++ 4.2
headers).

It's a big kluge, but it would mean that a new GCC could happily
consume preprocessed code from older libstdc++ headers.


  parent reply	other threads:[~2022-09-23 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 13:39 Marek Polacek
2022-09-22 22:14 ` Jason Merrill
2022-09-23 14:34   ` Marek Polacek
2022-09-23 14:43     ` Jonathan Wakely
2022-09-23 16:34       ` Jonathan Wakely
2022-09-23 16:37         ` Marek Polacek
2022-09-23 15:54     ` Jason Merrill
2022-09-23 16:16       ` Marek Polacek
2022-09-23 14:40   ` Jonathan Wakely [this message]
2022-09-23 15:04     ` Marek Polacek

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=CACb0b4niNgAfWpdzTaT1RTCUbFWdjF-VqO+wTyhGBSiD9w9Gwg@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=polacek@redhat.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).