]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std
authorJonathan Wakely <jwakely@redhat.com>
Mon, 4 Sep 2023 13:11:54 +0000 (14:11 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 15 Sep 2023 20:57:38 +0000 (21:57 +0100)
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.

libstdc++-v3/testsuite/24_iterators/reverse_iterator/100639.cc
libstdc++-v3/testsuite/std/ranges/iota/93267.cc
libstdc++-v3/testsuite/std/ranges/iota/96042.cc
libstdc++-v3/testsuite/std/ranges/iota/size.cc
libstdc++-v3/testsuite/std/ranges/subrange/96042.cc

index 5d0a7f4af27fc2d374ec2f09e406723a0c9b129b..68bf4e08488559281ee982acdda165666e822c6e 100644 (file)
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { 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
 
index 3bb74bbf48538711fbdf309aafbfba0df6de0ca1..4306aea4d4385b2441e0537ee4b7b851e6dc3697 100644 (file)
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 
index 7070a7d6b10cde17eb98a05d2af78dc3d39240f2..6c553de9ce951796ff0c84bc5fe0853edfba5d9d 100644 (file)
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>
index 958cb5f03c8631491ce3e89ce696ef512c9b2fcc..28848d55561912c0391358a2151fd4c6cee44a0d 100644 (file)
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++2a" }
 // { dg-do compile { target c++2a } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>
index bc22f999ed8bae844f7fa5874fe2d6cf9576e829..3856952eeb327f5aaa45c5bb6047d3c0b44c41da 100644 (file)
@@ -15,8 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=c++20" }
-// { dg-do compile { target c++2a } }
+// { dg-do compile { target c++20 } }
+// { dg-add-options strict_std }
 
 #include <ranges>
 #include <limits>