From: Jonathan Wakely Date: Mon, 4 Sep 2023 13:10:15 +0000 (+0100) Subject: libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std X-Git-Tag: basepoints/gcc-15~6092 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=52841fb7035c0e3a6d4354fc4e61c0bd3fea81ca;p=gcc.git libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std 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. --- 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 041f0cb88b3a..d5cb13ec4dbe 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 2a21876c1cf2..d5cc81c6b48e 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 0e96022cdfe1..5cea21992d91 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 06c4dc9e9ef0..8cda993e2cbb 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 e9029caad216..81837954125b 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 fd77071a2a51..6022039e0047 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 942a5aaf2fff..55626edfc2d1 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 c1c1f64d6c5b..619b97ee4a54 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 6466b38901de..d83a08c98560 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 8ea74e6c04b9..c45ef0daa50d 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 38afec91b349..39eeb0f76d88 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 389cb947cbe8..006716e0d69b 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 08ef3b587a44..ed5a7787525b 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 ed5111224e9c..0dd75956ce65 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