From patchwork Sat Dec 9 14:07:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 176193 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6107582vqy; Sat, 9 Dec 2023 07:28:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFy3B2cw6JYrlRf+zRuXmN+hHMQKgYgqOwCNrADewHOFQv3vicloJzaEDomhLqqIWKHYpZX X-Received: by 2002:a05:620a:3cd:b0:775:72b7:9300 with SMTP id r13-20020a05620a03cd00b0077572b79300mr2307113qkm.20.1702135734018; Sat, 09 Dec 2023 07:28:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702135734; cv=pass; d=google.com; s=arc-20160816; b=lOdiWTRkdM6uTmh+IWa0bBzl6UJChMM6no714F1R6f1LzMM/mHlPBb748Qkaeh7a5x 9hhI17AwRj/27o63mUsM82oMbYStMC5FV0/HiADEBoxIsDpENGDkUoYeJ2T9x1HgFdpn dC+xcLSLm3GkOnHByg4Qced93tphN0zZlQO6Za8oRWp9hnc9jUuenq1fPZvC33U7Yijs Jr04f1RGqhPVrDCzhw6GZ5V9YLMI+QHoosu3QiUwaQtryO2xTer16rTQlLuLsrek2j1P aO6/NuOTMhCGUZil4NDODVSKbo26TJnNrXngMqMFTtUazP85HImxS323cYbB5gaRdH5x EcCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=SficwbWf8UPnHiu+33M62cMq1lIv7RWPkdcdPJDF/uI=; fh=sJ+2/4g29YdyXkoRrFZSpsL2zxijepB7X/1rB0LDDh8=; b=fvw8xpvmn1TvNlRsrK1rNL1vU5ovUz66FnhcPasxohnTa2Pb1jnaiRM+UeVtsWVDPJ Ek1eMbfbgtlSyVvpnkB8NbsM0QvVtEcDuPpTKOszsB8bznmGABzliUdy1scWLhZYUAKo V85VIokG9Hz/R1QKFCPUxuvBm4Hjn8/ZPsZNfs77F1KVu12AO+3u9Oply40f4lNj/zGN Zyk4LF6Gwt2AC4qbQ9NN24IPzoqoC8ybVCOCgL+4dytuo5I1W5JMNzTZ6AUsIvFa5Byy NrkrdzEIhvNUdU7CI1bR2PwrwUrEjKSL1s5sp3e0ncsYiiQUmPYbp4srFjNTXrMSrreq IyDg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BVAAzeGm; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id br16-20020a05620a461000b0077da5d169bfsi4398789qkb.362.2023.12.09.07.28.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 07:28:54 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BVAAzeGm; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 817D3386186F for ; Sat, 9 Dec 2023 14:08:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id F1EEE385841E for ; Sat, 9 Dec 2023 14:08:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1EEE385841E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F1EEE385841E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702130916; cv=none; b=ZzcsnHSI4LxQonUREbK14TrkHRSiYx7O+041mywubmAVRdsna9KNsgrK+qHU2jYPWbqgek1yVz1w2IpqwD1S33n4n1hDyw+LmsEV49AfL44HDgz/guUsZDH66+xlfGBn5mt5p6ED1fd7C6ZuTsS+CjxL9wUptzZGFUdmobmgLF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702130916; c=relaxed/simple; bh=pp4eiKxSPHJCOiW1NmhLJ+vHu8fFNTJq6EjVmnSjwrc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kMweu5jupyCAtNKYkJ+j31uV1xUZnU4xMi/hBSmSWkxMcbYg78uFIAPDLqAT6n8CdXs4IXEpiFsKoYd8tOLbGSqGVKNNoGzlSMUwodXwGkKyxQvWofNzI7BA8HfNrzVGyUMbHY6O0A58X+NxYeHyz4R+f+TFtf3tuU+VMnLm2Rc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702130914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SficwbWf8UPnHiu+33M62cMq1lIv7RWPkdcdPJDF/uI=; b=BVAAzeGmJC8NzUtplkd+ybOcB5BidVX06J/xE4E1wnypjL28U3Xkhu2izzRLEb4U/CY26u Xsi/+MbPZoLGNduH6ppZID4wZh+Znrt5JPG4+Pw49gsxUCXerJWj1hOyW7a/N8N7OYbRy9 RzzRztHgwstWjwA3v83xmYi5s71jzYQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113-Zyz0uhHPOsGB4U9OWrOqng-1; Sat, 09 Dec 2023 09:08:31 -0500 X-MC-Unique: Zyz0uhHPOsGB4U9OWrOqng-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3DCC4185A780; Sat, 9 Dec 2023 14:08:31 +0000 (UTC) Received: from localhost (unknown [10.42.28.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0213F40C6EB9; Sat, 9 Dec 2023 14:08:30 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix value of __cpp_lib_format macro [PR111826] Date: Sat, 9 Dec 2023 14:07:26 +0000 Message-ID: <20231209140830.1100203-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784818679516104526 X-GMAIL-MSGID: 1784818679516104526 Tested x86_64-linux. Pushed to trunk. I'll check, but I think should be backported to gcc-13 too. -- >8 -- As noted in the PR, we support both features required for the 202110L value, so we should define it with that value. libstdc++-v3/ChangeLog: PR libstdc++/111826 * include/bits/version.def (format): Update value. * include/bits/version.h: Regenerate. * testsuite/std/format/functions/format.cc: --- libstdc++-v3/include/bits/version.def | 4 +- libstdc++-v3/include/bits/version.h | 128 +++++++++--------- .../testsuite/std/format/functions/format.cc | 4 +- 3 files changed, 67 insertions(+), 69 deletions(-) diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index 140777832ed..38b73ec9b5d 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -1160,14 +1160,12 @@ ftms = { // TODO: #define __cpp_lib_format_ranges 202207L name = format; values = { - v = 202106; + v = 202110; cxxmin = 20; hosted = yes; }; }; -// #undef __glibcxx_chrono -// #define __glibcxx_chrono 201907L // FIXME: #define __glibcxx_execution 201902L ftms = { diff --git a/libstdc++-v3/testsuite/std/format/functions/format.cc b/libstdc++-v3/testsuite/std/format/functions/format.cc index dacc276e03c..9328dec8875 100644 --- a/libstdc++-v3/testsuite/std/format/functions/format.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format.cc @@ -5,7 +5,7 @@ #ifndef __cpp_lib_format # error "Feature test macro for std::format is missing in " -#elif __cpp_lib_format < 202106L +#elif __cpp_lib_format < 202110L # error "Feature test macro for std::format has wrong value in " #endif @@ -13,7 +13,7 @@ #include #ifndef __cpp_lib_format # error "Feature test macro for std::format is missing in " -#elif __cpp_lib_format < 202106L +#elif __cpp_lib_format < 202110L # error "Feature test macro for std::format has wrong value in " #endif