From patchwork Thu Aug 4 12:31:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 384 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp347688pxt; Thu, 4 Aug 2022 05:33:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6y5wSi5LfGrWnY5QlnK05OMmzlm6J+fdX/DzYH0UAehz/moh0ZQaGxdfm56zeeRGBdW9Ft X-Received: by 2002:a17:907:2719:b0:730:a5e7:9da7 with SMTP id w25-20020a170907271900b00730a5e79da7mr1325867ejk.26.1659616397141; Thu, 04 Aug 2022 05:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659616397; cv=none; d=google.com; s=arc-20160816; b=f5Viir9zPeONnyOPQSOxa2/+ZZIOwjSocX/N5QL9EitWXSEZuoCCqVLIatOql5WXhW 3CZiiHSTrQ9BH+PvauEn2D0tA/R5dtPIvhN92vwUk6iV/OC3+UBkbXl9iY7Mp0uYHHVl 7qAw2jhnvA6wGhNWIvKN60ZJnchEyIHeThJ3Pe9VaRa7vLde6sitXYv62vke+vI+GMg0 XzCFD6L/sIre9MzhBA75KrPQ/1jrWDRtVIcjwYvadoqV89d7qJngzSIyJYmmx4eVqK9d IJxXppmqIGtQ8BTeWHj7Ts4pVHgENwbJvWwzQgIjwmRLutTzetoGLRmG4MB5H2ziFtnz pi1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=6MtUhWOIqm27fiPmgzJhr0P+1Gs++Fu1OuzxExrK/6A=; b=dGeXqU83U2aq2EOXQU2F/A63AtsfhpoLmu4EGz9IOk+N8PvCZzF7/z+Nf9f+ndM1SJ Cns4Gnv42WD9gjY31mnMmRGG8joslD5W37i92e28n2Sg1HfCEupj3JWhNJ9uL5LXNvUv e/SAg85HW98IWvBruzevuR67S8EWJRQ982T+FS0kyBAd4CK49iI2QnNrGH0I6N13iMmC /Was7AVxSMR9HB+N3ejpgzR1rJqK1tz/0pNj8rPRkwnDDiDJwv6l9HFVG3U9Vyq+9/HA 52teoLgc40AXLMrX0KMASEn/BvwQPj3QqivQLxl8sd96e5r8AX8Tp29S9FlBQ7gNYbjY 6aCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Czsmk1B+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hv10-20020a17090760ca00b0072b6ff7720dsi645449ejc.771.2022.08.04.05.33.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 05:33:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Czsmk1B+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 29E70385740A for ; Thu, 4 Aug 2022 12:32:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29E70385740A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1659616324; bh=6MtUhWOIqm27fiPmgzJhr0P+1Gs++Fu1OuzxExrK/6A=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Czsmk1B+FeGhIPfW1M6Cbj5SSVtDLYVtlcH/DzDeIQNAFMjU2aUlNdE4qX1ymm4et JzFfhCG6kcDB1QjJ1VTFIhTZ8YVE93dsqJtSpiqvUrhmp9LpXzKPattnuRiBkF9Tn/ HvB0W8SKBmfSqxroNv1g1pOYWCdsr9IzyqnEM8lk= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 8CC6A3856948 for ; Thu, 4 Aug 2022 12:31:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8CC6A3856948 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-660-LPz-m6UEMjOVb577VybtDg-1; Thu, 04 Aug 2022 08:31:05 -0400 X-MC-Unique: LPz-m6UEMjOVb577VybtDg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC510185A7B2; Thu, 4 Aug 2022 12:31:04 +0000 (UTC) Received: from localhost (unknown [10.33.36.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92FD52026D4C; Thu, 4 Aug 2022 12:31:04 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Update value of __cpp_lib_ios_noreplace macro Date: Thu, 4 Aug 2022 13:31:03 +0100 Message-Id: <20220804123103.726574-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 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, SPF_HELO_NONE, SPF_NONE, TXREP 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1740233923374985081?= X-GMAIL-MSGID: =?utf-8?q?1740233923374985081?= Tested powerpc64le-linux, pushed to trunk. -- >8 -- My P2467R1 proposal was accepted for C++23 so there's an official value for this macro now. libstdc++-v3/ChangeLog: * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update value to 202207L. * include/std/version (__cpp_lib_ios_noreplace): Likewise. * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check for new value. * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc: Likewise. --- libstdc++-v3/include/bits/ios_base.h | 2 +- libstdc++-v3/include/std/version | 2 +- .../testsuite/27_io/basic_ofstream/open/char/noreplace.cc | 4 ++-- .../testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h index e34097171a5..5b554548ecd 100644 --- a/libstdc++-v3/include/bits/ios_base.h +++ b/libstdc++-v3/include/bits/ios_base.h @@ -474,7 +474,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const openmode __noreplace = _S_noreplace; #if __cplusplus >= 202100L -#define __cpp_lib_ios_noreplace 202200L +#define __cpp_lib_ios_noreplace 202207L /// Open a file in exclusive mode. static const openmode noreplace = _S_noreplace; #endif diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 5edca2f3007..6b6187973a2 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -316,7 +316,7 @@ # define __cpp_lib_expected 202202L #endif #define __cpp_lib_invoke_r 202106L -#define __cpp_lib_ios_noreplace 202200L +#define __cpp_lib_ios_noreplace 202207L #if __cpp_lib_concepts # undef __cpp_lib_optional # define __cpp_lib_optional 202110L diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc index e39f5928a1f..56ff2d7cead 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc @@ -2,10 +2,10 @@ #include -#if __cplusplus >= 202200L +#if __cplusplus >= 202207L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " -#elif __cpp_lib_ios_noreplace < 202200L +#elif __cpp_lib_ios_noreplace < 202207L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc index 77f11865ac4..f0425cdab3d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc @@ -2,10 +2,10 @@ #include -#if __cplusplus >= 202200L +#if __cplusplus >= 202207L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " -#elif __cpp_lib_ios_noreplace < 202200L +#elif __cpp_lib_ios_noreplace < 202207L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif