diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-09-20 16:34:49 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-09-20 16:34:49 +0000 |
commit | 194e23e922e5255f1d59b9bb0e2acc4ac9a2dc38 (patch) | |
tree | c2596648bf96433f4ea173e2453ba31220dd6f83 /libstdc++-v3 | |
parent | b644c5b6ced3facbc5efdadae4a9bdfb2841fffe (diff) | |
download | gcc-194e23e922e5255f1d59b9bb0e2acc4ac9a2dc38.tar.gz |
PR libstdc++/81469 deprecate std::uncaught_exception for C++17
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253018 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/exception | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc | 1 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc | 2 |
4 files changed, 10 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 023e7ae58cd..9b789b967fa 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index e51d31c938b..9b177c7ee8a 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -98,9 +98,10 @@ namespace std * %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__)); diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc index a53b0669b83..635672cc255 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc @@ -1,3 +1,4 @@ +// { dg-options "-Wno-deprecated" } // { dg-do run { target c++11 } } // Copyright (C) 2015-2017 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc b/libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc index 78581af5629..8bc4953e028 100644 --- a/libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc +++ b/libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc @@ -18,6 +18,8 @@ // PR 14026 // 18.6.4 uncaught_exception +// { dg-options "-Wno-deprecated" } + #include <cstdlib> #include <exception> #include <testsuite_hooks.h> |