From patchwork Mon Sep 11 16:16:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 137900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2194080vqo; Mon, 11 Sep 2023 09:45:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/xr/T8majGDJ5hX5C/LE4btBiFsuUwh+22s5ee1ZXQjrksEvYvKnYkh+ny3S/ZXiydFtC X-Received: by 2002:ac2:4f06:0:b0:4f8:5886:186d with SMTP id k6-20020ac24f06000000b004f85886186dmr8636649lfr.9.1694450740870; Mon, 11 Sep 2023 09:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694450740; cv=none; d=google.com; s=arc-20160816; b=YBHVi1TJTJopcJD75v7GF9/oHpjUUGx1rB8qL1EDz+gLC/GGp/dgndk3x438QyobXi vfYgyco83qAHobwNQ/j6xSR3p4K95wwARdpkFSRspC47KUcKhZXqko0YXmIF/AbSXjY7 qVgja/cLigRJNUTA/6MmjjeVU6cF5KRLeFnlzOkoWjxL3S6bdPBZKldICzIlS84gQHpf sQdQJymHOiAoVgKbr3JugpFest+UUPpNaNYFSg3e18ttoT8dbRor6XaJPrPWBpQ/67mj deAthqe3h2wltrMjizLtZylRUsvL5Zu7mC2aEmG2RB4B7uiMKpTDoyFsTI/E+h0YN3wX L/aQ== 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:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=3+vjGCuG/W3IpnwRO5E6IQ5bGGAxadKMUR5lsFAxQK8=; fh=sJ+2/4g29YdyXkoRrFZSpsL2zxijepB7X/1rB0LDDh8=; b=k76XIITrjVywhgXI1s4aKX3ozugOsaG/9aCMPjvEKfQ/jfA0krMakuR3+zcyU/pDkT SO8QZlg2AOITRiECZgZgRUWG8hO6ntlSrPWlTOG8wzdNymXL+UGJAjw2aXBf8tVR8bwo sMWbEdlMLxS0C8x82RXMyGFo8fBJIFKv/raAI21mSl/794bA8dVw0mvw4Anq7ZtmD+bz bSL4Bjofycg5Gy03HGuYkNREL8xFyOOvQ91FWyVWLjiEJI4OuZ8lRpqxmb7QxafMGmZF Vszeh2Jn4WZD3LNVNrSWBtaWV3DJqA6wjJap3xawFqSOa0Fc9w2dugj4ElhHaDHDsFCr KHXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=cEkrLrx7; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id n23-20020aa7c457000000b005234d073442si7214327edr.279.2023.09.11.09.45.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 09:45:40 -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=cEkrLrx7; 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 9DE663882ACC for ; Mon, 11 Sep 2023 16:39:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DE663882ACC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694450347; bh=3+vjGCuG/W3IpnwRO5E6IQ5bGGAxadKMUR5lsFAxQK8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cEkrLrx78IdBwhmYQKnOgtzj5T5VAToofj46w9rBEqD0ym5+fUSzOwwbn7ygOl36a /5f/jh5r+OTBmX/feyOb6NKjlLsn4yLqf+zx2TWxg9Brr8+aqDC5eIL8apZIdGxqdS 3WZmOXeXmQtwS0OVYGR/9wZ1y0reP1m+18y2RnLc= 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 78794385841F for ; Mon, 11 Sep 2023 16:35:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78794385841F 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-578-Layf-0U5Mm-5AXPcNy8G8g-1; Mon, 11 Sep 2023 12:35:39 -0400 X-MC-Unique: Layf-0U5Mm-5AXPcNy8G8g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 24732101FAA2; Mon, 11 Sep 2023 16:35:39 +0000 (UTC) Received: from localhost (unknown [10.42.28.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDE6C2027019; Mon, 11 Sep 2023 16:35:38 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std Date: Mon, 11 Sep 2023 17:16:35 +0100 Message-ID: <20230911163534.1913512-5-jwakely@redhat.com> In-Reply-To: <20230911163534.1913512-1-jwakely@redhat.com> References: <20230911163534.1913512-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 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_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, URI_HEX autolearn=ham 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: , 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: INBOX X-GMAIL-THRID: 1776760380168734063 X-GMAIL-MSGID: 1776760380168734063 The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. Because they test a problem seen with -std=c++20 add the new { dg-add-options strict_std } directive so that the test runner uses -std=c++NN not -std=gnu++NN. libstdc++-v3/ChangeLog: * testsuite/24_iterators/reverse_iterator/100639.cc: Remove dg-options and add dg-add-options strict_std. * testsuite/std/ranges/iota/93267.cc: Likewise. * testsuite/std/ranges/iota/96042.cc: Likewise. * testsuite/std/ranges/iota/size.cc: Likewise. * testsuite/std/ranges/subrange/96042.cc: Likewise. --- .../testsuite/24_iterators/reverse_iterator/100639.cc | 4 ++-- libstdc++-v3/testsuite/std/ranges/iota/93267.cc | 4 ++-- libstdc++-v3/testsuite/std/ranges/iota/96042.cc | 4 ++-- libstdc++-v3/testsuite/std/ranges/iota/size.cc | 2 +- libstdc++-v3/testsuite/std/ranges/subrange/96042.cc | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc index 5d0a7f4af27..68bf4e08488 100644 --- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc +++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++2a" } -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } +// { dg-add-options strict_std } // PR libstdc++/100639 diff --git a/libstdc++-v3/testsuite/std/ranges/iota/93267.cc b/libstdc++-v3/testsuite/std/ranges/iota/93267.cc index 3bb74bbf485..4306aea4d43 100644 --- a/libstdc++-v3/testsuite/std/ranges/iota/93267.cc +++ b/libstdc++-v3/testsuite/std/ranges/iota/93267.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++2a" } -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/std/ranges/iota/96042.cc b/libstdc++-v3/testsuite/std/ranges/iota/96042.cc index 7070a7d6b10..6c553de9ce9 100644 --- a/libstdc++-v3/testsuite/std/ranges/iota/96042.cc +++ b/libstdc++-v3/testsuite/std/ranges/iota/96042.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++2a" } -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } +// { dg-add-options strict_std } #include #include diff --git a/libstdc++-v3/testsuite/std/ranges/iota/size.cc b/libstdc++-v3/testsuite/std/ranges/iota/size.cc index 958cb5f03c8..28848d55561 100644 --- a/libstdc++-v3/testsuite/std/ranges/iota/size.cc +++ b/libstdc++-v3/testsuite/std/ranges/iota/size.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++2a" } // { dg-do compile { target c++2a } } +// { dg-add-options strict_std } #include #include diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc b/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc index bc22f999ed8..3856952eeb3 100644 --- a/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc +++ b/libstdc++-v3/testsuite/std/ranges/subrange/96042.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++20" } -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } +// { dg-add-options strict_std } #include #include