From patchwork Mon Sep 11 16:16:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 137901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2194873vqo; Mon, 11 Sep 2023 09:47:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHP04q0cPRIMpk6HLvevMV8l8wRmMTcW3R3pKMNWmNHt6VmYvq9bVEMSRjE+6o89R49Srsr X-Received: by 2002:a19:e057:0:b0:4f8:6d53:a68f with SMTP id g23-20020a19e057000000b004f86d53a68fmr7275420lfj.64.1694450824356; Mon, 11 Sep 2023 09:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694450824; cv=none; d=google.com; s=arc-20160816; b=dEt4bP9gbzO4ei5VFqAl8xTAO7+73aMMWFDn6hIUsaCVRluOs6iotFgZAj5M7iqgnG RW0JRQI3ylMTr0uxbgToZFH1OAceFcbkVXohxa08L5iSb3BICFb1xw0+bLJZJAKxTRrd AdrMRPzIsmcbFFMR5q0Vlzv7T9GSHw6OmRKC05mYrO9LzF0O+nKDlV9MFjnp42P0lfKm QNzeekZYsbdduaWRS1t0H0rOwHzFmMb9hb4DC8mjv2rNqqDJpmgfhzXFJbBfnamOB3/l sgl6ApIy9B1F78uFeUCUMV9VScuxXk139GCh24suti8TdILwSZe30zd0qsRSG7kfWC2l Cb2Q== 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=6gYClcd2HIW6km7oCikZ2bJ1TlsQ5E8GdBzWQdX7d4U=; fh=sJ+2/4g29YdyXkoRrFZSpsL2zxijepB7X/1rB0LDDh8=; b=rOsTgQOSijRfIzJSUoHlOir6tZNPXKZ4yPHFd4zXnOkGrIsw8oQqyGRJ7t223iwYGG 90EppqFUgYkZWutZEkHqW5jJ2KZXL8zzfaIx7ldxk/kZYO7UkYMPTKkwC8Pg1eZqnMuc pRdDKsykmN6RwXT8TgKdh9KM6MtKuakkBrBYDWP0KxZNtn5pHnhUYX7xFRPDaawagzyq HZVhptv0P8imI9jQkv+iXDE3458aXLXdRjT3yH+fmlkYBWhwmVHxPsluiwUnmKNuisPP oPGubzxDs7lbHQUZpO52S5pZrcd7ekzTIrg98z5FrYb09VaOmFnQ8h0EkhHFeZPDcLUC 9/7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=eiiNWuGx; 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 m6-20020a17090679c600b00982bd2c070fsi6401652ejo.469.2023.09.11.09.47.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 09:47:04 -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=eiiNWuGx; 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 B219B3952022 for ; Mon, 11 Sep 2023 16:39:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B219B3952022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694450391; bh=6gYClcd2HIW6km7oCikZ2bJ1TlsQ5E8GdBzWQdX7d4U=; 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=eiiNWuGx0pl/6vdNX475HA9iL7nNxeCfAcZLa3DrGMmlhbkV6yaFqv3+7krsb53jv HUrKHKdWCoV/I9SzVOhp4npyNaEGQsCbAn5RuN2PFGPFcpMx+vairhs6M4aE8lfSle 72n8ubsW/ToHY7QFTasyoo6TD289Wvm7RDpFsbZI= 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 4660C3858024 for ; Mon, 11 Sep 2023 16:35:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4660C3858024 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-53-WGKBi-BtOiKe4a63dbLqKA-1; Mon, 11 Sep 2023 12:35:37 -0400 X-MC-Unique: WGKBi-BtOiKe4a63dbLqKA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 6791A933723; Mon, 11 Sep 2023 16:35:37 +0000 (UTC) Received: from localhost (unknown [10.42.28.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 278962156701; Mon, 11 Sep 2023 16:35:37 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std Date: Mon, 11 Sep 2023 17:16:33 +0100 Message-ID: <20230911163534.1913512-3-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.6 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, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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.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: 1776760467918260556 X-GMAIL-MSGID: 1776760467918260556 These tests can (and should) also be run for later standards, so replace the { dg-options "-std=c++11" } with { dg-add-options strict_std } and a target selector for c++11. libstdc++-v3/ChangeLog: * testsuite/23_containers/deque/48101-2_neg.cc: Replace dg-options with target selector. * testsuite/23_containers/forward_list/48101-2_neg.cc: Likewise. * testsuite/23_containers/list/48101-2_neg.cc: Likewise. * testsuite/23_containers/map/48101-2_neg.cc: Likewise. * testsuite/23_containers/map/48101_neg.cc: Likewise. * testsuite/23_containers/multimap/48101-2_neg.cc: Likewise. * testsuite/23_containers/multimap/48101_neg.cc: Likewise. * testsuite/23_containers/multiset/48101-2_neg.cc: Likewise. * testsuite/23_containers/set/48101-2_neg.cc: Likewise. * testsuite/23_containers/unordered_map/48101-2_neg.cc: Likewise. * testsuite/23_containers/unordered_multimap/48101-2_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/48101-2_neg.cc: Likewise. * testsuite/23_containers/unordered_set/48101-2_neg.cc: Likewise. * testsuite/23_containers/vector/48101-2_neg.cc: Likewise. --- libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc | 4 ++-- .../testsuite/23_containers/forward_list/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/map/48101_neg.cc | 3 +-- libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc | 3 +-- libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc | 4 ++-- .../testsuite/23_containers/unordered_map/48101-2_neg.cc | 4 ++-- .../testsuite/23_containers/unordered_multimap/48101-2_neg.cc | 4 ++-- .../testsuite/23_containers/unordered_multiset/48101-2_neg.cc | 4 ++-- .../testsuite/23_containers/unordered_set/48101-2_neg.cc | 4 ++-- libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc | 4 ++-- 14 files changed, 26 insertions(+), 28 deletions(-) diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc index 041f0cb88b3..d5cb13ec4db 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc index 2a21876c1cf..d5cc81c6b48 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc index 0e96022cdfe..5cea21992d9 100644 --- a/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc index 06c4dc9e9ef..8cda993e2cb 100644 --- a/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/map/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc index e9029caad21..81837954125 100644 --- a/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/map/48101_neg.cc @@ -15,8 +15,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } #include diff --git a/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc index fd77071a2a5..6022039e004 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc index 942a5aaf2ff..55626edfc2d 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/48101_neg.cc @@ -15,8 +15,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } #include diff --git a/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc index c1c1f64d6c5..619b97ee4a5 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc index 6466b38901d..d83a08c9856 100644 --- a/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/set/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc index 8ea74e6c04b..c45ef0daa50 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc index 38afec91b34..39eeb0f76d8 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc index 389cb947cbe..006716e0d69 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc index 08ef3b587a4..ed5a7787525 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc index ed5111224e9..0dd75956ce6 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/48101-2_neg.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile } -// { dg-options "-std=c++11" } +// { dg-do compile { target c++11 } } +// { dg-add-options strict_std } #include