Skip to content

Commit 194e23e

Browse files
author
redi
committed
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
1 parent b644c5b commit 194e23e

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

libstdc++-v3/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
2017-09-20 Jonathan Wakely <[email protected]>
22

3+
PR libstdc++/81469
4+
* libsupc++/exception (uncaught_exception): Deprecate for C++17.
5+
* testsuite/18_support/exception_ptr/62258.cc: Add -Wno-deprecated.
6+
* testsuite/18_support/uncaught_exception/14026.cc: Likewise.
7+
38
* include/bits/c++config (_GLIBCXX17_DEPRECATED): Define.
49
* include/bits/functional_hash.h (__hash_base::result_type)
510
(__hash_base::argument_type): Add _GLIBCXX17_DEPRECATED.

libstdc++-v3/libsupc++/exception

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ namespace std
9898
* %exception can result in a call of @c terminate()
9999
* (15.5.1).'
100100
*/
101+
_GLIBCXX17_DEPRECATED
101102
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
102103

103-
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++98
104+
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++17 or gnu++98
104105
#define __cpp_lib_uncaught_exceptions 201411
105106
/// The number of uncaught exceptions.
106107
int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));

libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// { dg-options "-Wno-deprecated" }
12
// { dg-do run { target c++11 } }
23

34
// Copyright (C) 2015-2017 Free Software Foundation, Inc.

libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// PR 14026
1919
// 18.6.4 uncaught_exception
2020

21+
// { dg-options "-Wno-deprecated" }
22+
2123
#include <cstdlib>
2224
#include <exception>
2325
#include <testsuite_hooks.h>

0 commit comments

Comments
 (0)