diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C index ea152237d54..0183ad6d918 100644 --- a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C @@ -1,6 +1,6 @@ // Test that checking of a nothrow specification uses the one on the // definition. -// { dg-do run { target c++11 } } +// { dg-do run { target { c++11 && { ! c++23 } } } } // { dg-options "-Wno-terminate" } #include diff --git a/libstdc++-v3/testsuite/18_support/exception/38732.cc b/libstdc++-v3/testsuite/18_support/exception/38732.cc index 7b68921d074..a3888353a4b 100644 --- a/libstdc++-v3/testsuite/18_support/exception/38732.cc +++ b/libstdc++-v3/testsuite/18_support/exception/38732.cc @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +// { dg-do run { target { c++11 && { ! c++23 } } } } + #include #include #include "unwind.h" diff --git a/libstdc++-v3/testsuite/18_support/headers/exception/synopsis.cc b/libstdc++-v3/testsuite/18_support/headers/exception/synopsis.cc index efc0bc64c18..ceb7d1f754b 100644 --- a/libstdc++-v3/testsuite/18_support/headers/exception/synopsis.cc +++ b/libstdc++-v3/testsuite/18_support/headers/exception/synopsis.cc @@ -1,4 +1,4 @@ -// { dg-do compile { target c++11 } } +// { dg-do compile { target { c++11 && { ! c++23 } } } } // Copyright (C) 2007-2022 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/18_support/unexpected_handler.cc b/libstdc++-v3/testsuite/18_support/unexpected_handler.cc index efd00abf879..344e7e08294 100644 --- a/libstdc++-v3/testsuite/18_support/unexpected_handler.cc +++ b/libstdc++-v3/testsuite/18_support/unexpected_handler.cc @@ -16,7 +16,7 @@ // . // { dg-options "-Wno-deprecated-declarations" } -// { dg-do run { target c++11 } } +// { dg-do run { target { c++11 && { ! c++23 } } } } // D.11 Violating exception-specifications