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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id EA2D2388A423 for ; Mon, 14 Jun 2021 13:06:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA2D2388A423 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-307-np6_Itm6OSCBZaQgNWTBNA-1; Mon, 14 Jun 2021 09:06:43 -0400 X-MC-Unique: np6_Itm6OSCBZaQgNWTBNA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 088801084F47; Mon, 14 Jun 2021 13:06:42 +0000 (UTC) Received: from localhost (unknown [10.33.36.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACC8819D9B; Mon, 14 Jun 2021 13:06:41 +0000 (UTC) Date: Mon, 14 Jun 2021 14:06:40 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [committed] libstdc++: Use reserved name for attribute [PR101055] Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="5RKxjdk2RdA0NkDO" Content-Disposition: inline X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2021 13:06:47 -0000 --5RKxjdk2RdA0NkDO Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 14/06/21 11:54 +0100, Jonathan Wakely wrote: >The no_unique_address attribute is not a reserved name until C++20, so >to use it in C++11/14/17 modes we should use the __no_unique_address_ >form. We already use that form when using the attribute, but not in the >__has_cpp_attribute check. > >libstdc++-v3/ChangeLog: > > PR libstdc++/101055 > * include/std/tuple: Use reserved form of attribute name. > * testsuite/17_intro/headers/c++2011/all_attributes.cc: Add > check for no_unique_address. > * testsuite/17_intro/headers/c++2014/all_attributes.cc: > Likewise. > * testsuite/17_intro/headers/c++2017/all_attributes.cc: > Likewise. And this ensures the modified C++17 test doesn't fail when using a newer -std option. Tested powerpc64le-linux. Committed to trunk. --5RKxjdk2RdA0NkDO Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit 45fb3d45a4d4b79a00c56fa93e9e69d9d7762ca0 Author: Jonathan Wakely Date: Mon Jun 14 13:17:40 2021 libstdc++: Add explicit -std=gnu++17 option to test This test has no -std option so when the testsuite is run with -std=gnu++20 or later, this test will use that. The recent addition of no_unique_address will cause it to FAIL, because that's a reserved word after C++17. Add an explicit option, so that this test alays uses exactly C++17. libstdc++-v3/ChangeLog: * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add -std=gnu++17 option. diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc index 811b3fe3613..ea2c7d20ba2 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc @@ -15,6 +15,7 @@ // with this library; see the file COPYING3. If not see // . +// { dg-options "-std=gnu++17" } // { dg-do compile { target c++17 } } // Ensure the library only uses the __name__ form for attributes. --5RKxjdk2RdA0NkDO--