PR libstdc++/81469
* libsupc++/exception (uncaught_exception): Deprecate for C++17.
* testsuite/18_support/exception_ptr/62258.cc: Add -Wno-deprecated.
* testsuite/18_support/uncaught_exception/14026.cc: Likewise.
From-SVN: r253018
2017-09-20 Jonathan Wakely <jwakely@redhat.com>
+ PR libstdc++/81469
+ * libsupc++/exception (uncaught_exception): Deprecate for C++17.
+ * testsuite/18_support/exception_ptr/62258.cc: Add -Wno-deprecated.
+ * testsuite/18_support/uncaught_exception/14026.cc: Likewise.
+
* include/bits/c++config (_GLIBCXX17_DEPRECATED): Define.
* include/bits/functional_hash.h (__hash_base::result_type)
(__hash_base::argument_type): Add _GLIBCXX17_DEPRECATED.
* %exception can result in a call of @c terminate()
* (15.5.1).'
*/
+ _GLIBCXX17_DEPRECATED
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
-#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++98
+#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++17 or gnu++98
#define __cpp_lib_uncaught_exceptions 201411
/// The number of uncaught exceptions.
int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
+// { dg-options "-Wno-deprecated" }
// { dg-do run { target c++11 } }
// Copyright (C) 2015-2017 Free Software Foundation, Inc.
// PR 14026
// 18.6.4 uncaught_exception
+// { dg-options "-Wno-deprecated" }
+
#include <cstdlib>
#include <exception>
#include <testsuite_hooks.h>