aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-03-28 22:05:01 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-03-29 20:30:43 +0100
commit95768878c718f80e3d562130e2118831bc7fdbf6 (patch)
treef94f7d6dc0b11adf524ce51fe17d3fc1cb15627d
parent5eba1575ec82cf7376f48873cb92608ad3f87f09 (diff)
downloadgcc-95768878c718f80e3d562130e2118831bc7fdbf6.zip
gcc-95768878c718f80e3d562130e2118831bc7fdbf6.tar.gz
gcc-95768878c718f80e3d562130e2118831bc7fdbf6.tar.bz2
testsuite: Disable tests for C++23 that depend on std::unexpected
These tests depend on unexpected handlers, which are no longer declared for C++23 mode. Adjust the target specifier so they don't run. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept06.C: Disable for C++23. libstdc++-v3/ChangeLog: * testsuite/18_support/exception/38732.cc: Disable for C++23. * testsuite/18_support/headers/exception/synopsis.cc: Likewise. * testsuite/18_support/unexpected_handler.cc: Likewise.
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept06.C2
-rw-r--r--libstdc++-v3/testsuite/18_support/exception/38732.cc2
-rw-r--r--libstdc++-v3/testsuite/18_support/headers/exception/synopsis.cc2
-rw-r--r--libstdc++-v3/testsuite/18_support/unexpected_handler.cc2
4 files changed, 5 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
index ea15223..0183ad6 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 <exception>
diff --git a/libstdc++-v3/testsuite/18_support/exception/38732.cc b/libstdc++-v3/testsuite/18_support/exception/38732.cc
index 7b68921..a388835 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
// <http://www.gnu.org/licenses/>.
+// { dg-do run { target { c++11 && { ! c++23 } } } }
+
#include <typeinfo>
#include <exception>
#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 efc0bc6..ceb7d1f 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 efd00ab..344e7e0 100644
--- a/libstdc++-v3/testsuite/18_support/unexpected_handler.cc
+++ b/libstdc++-v3/testsuite/18_support/unexpected_handler.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-options "-Wno-deprecated-declarations" }
-// { dg-do run { target c++11 } }
+// { dg-do run { target { c++11 && { ! c++23 } } } }
// D.11 Violating exception-specifications