From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 725783857B8D for ; Fri, 23 Sep 2022 14:40:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 725783857B8D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663944036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=f8kS/7MZRsCu+2o+slLoAJDAt1kTc5PZYNrQXJmaFaU=; b=afsEB2vkxvbnKtZI8mwEx2z79rAIF4G1ytNvJuioHyyrU/BsPQB7Tp67mri+sdccNYTd/k useMAj+Nolh7dsDnUTfnfoLcnHKIxQMZhlgRwLG0XSmkoNSPc6g3q58acGMuxmLNzEhBq1 ECZ5lnzAfhyiSQA66arsERfMqXBvdqI= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-388-noiaBZ9iPE6HCH5XxxAseA-1; Fri, 23 Sep 2022 10:40:35 -0400 X-MC-Unique: noiaBZ9iPE6HCH5XxxAseA-1 Received: by mail-qt1-f198.google.com with SMTP id i12-20020ac871cc000000b0035ba1b1ba9cso64991qtp.22 for ; Fri, 23 Sep 2022 07:40:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=f8kS/7MZRsCu+2o+slLoAJDAt1kTc5PZYNrQXJmaFaU=; b=wBDKmUD1JDhBL3ugwF43Vx/x+GuEDyUUQJ9VroV6NZ4TbfyhNiLq2W3K7sA99xBjC3 R9jzUiLozP4X9W0vo6Heup3TyLgeZZkWrHWkHkhB/uYtQzTSEeuZvQa9PRkH9R/p5XzN KzJ1ow5JzDg2x/XQtZTiU8RHg71wYZD3/+ZoCZ6+OgFa8o3je227xfWv+FzkEa/cCxJp EhPbEqzn/D3A4GyyzldYi12wDdPCSLjoAn/+/w8UiRQLzCZ5aqw7vnd1ulZy9TOzin3N OKQJstaQGpRd3S2zdQ/xb1mxjF+8QvUhhoigJkJRba7GOz28Ot45BNy3STOdPVr4n3tQ wmng== X-Gm-Message-State: ACrzQf3TUv1ezUPkf5e5OiBI2sktvFn/R8BlNV6txM2/fojSrI8gZYSm meaf3EutsoLyKFrnEw1OJs7y1o18q5xfS10ofEbvBpc68G2sIVzcSuA66adQ4GcbQrAX8TVzvc0 kL3/3iNV/hzasdQBNgwaMZnLWPlsh/Qc= X-Received: by 2002:a05:620a:25c8:b0:6ae:be73:86c6 with SMTP id y8-20020a05620a25c800b006aebe7386c6mr5655031qko.531.1663944034755; Fri, 23 Sep 2022 07:40:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM78tamQ/zKvmtsam4CPo5uCqTNyFVVMUeG7vQ8tOn56/xDrrpe6PjLgNyrmW7TgSs9kriJ2qa/fOINsaUAr3gs= X-Received: by 2002:a05:620a:25c8:b0:6ae:be73:86c6 with SMTP id y8-20020a05620a25c800b006aebe7386c6mr5655017qko.531.1663944034545; Fri, 23 Sep 2022 07:40:34 -0700 (PDT) MIME-Version: 1.0 References: <20220922133900.142238-1-polacek@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Fri, 23 Sep 2022 15:40:23 +0100 Message-ID: Subject: Re: [PATCH] c++: Implement __is_{nothrow_,}convertible [PR106784] To: Jason Merrill Cc: Marek Polacek , GCC Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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.