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 6B3D63858C52 for ; Fri, 23 Sep 2022 14:40:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B3D63858C52 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-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-388-oNbDyYlGM_6rLJId8xGkhg-1; Fri, 23 Sep 2022 10:40:35 -0400 X-MC-Unique: oNbDyYlGM_6rLJId8xGkhg-1 Received: by mail-qk1-f199.google.com with SMTP id bm21-20020a05620a199500b006cf6a722b16so210078qkb.0 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=CWfvbdQEMUyhi980xXOyOXLw8WFWoWv8liALDBCzkFA1vq63yVADyNhsqIGipU5mi4 2YSLuTvM9YpslrxRuxt1/quiQZ4YRrFNchbWKSAOy2I5O1wLjtSr0+hGVprsR4lDs481 0AUAqOsJLF5wlu/Ydj8Ry7guhEJo7J4sLWOWzD8W3JYP3/ofLi+mXzPUAbk+jAco8yFD hTlyXLORW+JKC3VI5LZJ4Q1UUO464RHv6JeyyjpX7PzmZnsG94VnKZfwB6Vuqd6xOVMz LTIpvvLykKRlyEG6G4pxA2xEKMdJVx8XYEr2S34v6hQ5V5To/BGqccxLuIGyCl+I69lE dI0g== X-Gm-Message-State: ACrzQf19xzPTNHK5TgCkA3VOSdY8gfQlMvPXT1POZhS7xV2iFHp+Fms1 InFQ/apD9zwqZXsZdnK3r7qzeCJ3YDRsbBYRUK7OsLRotSX/ChIajfUkAjPq43B0nKaRpDNm9pf ev4yv0FumgNIFBBN0psP8VVpMAKqq7vK+dA== X-Received: by 2002:a05:620a:25c8:b0:6ae:be73:86c6 with SMTP id y8-20020a05620a25c800b006aebe7386c6mr5655030qko.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=-7.0 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.