* [PATCH] PR libstdc++/81469 deprecate std::uncaught_exception for C++17
@ 2017-09-20 16:35 Jonathan Wakely
2017-09-28 18:52 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2017-09-20 16:35 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 365 bytes --]
C++17 deprecates uncaught_exception in favour of uncaught_exceptions,
so this adds the attribute.
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.
Tested powerpc64le-linux, committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2134 bytes --]
commit 0b85751e9bfeeba7568b915e4c59a191f0a509c1
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Sep 20 14:44:02 2017 +0100
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.
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PR libstdc++/81469 deprecate std::uncaught_exception for C++17
2017-09-20 16:35 [PATCH] PR libstdc++/81469 deprecate std::uncaught_exception for C++17 Jonathan Wakely
@ 2017-09-28 18:52 ` Jakub Jelinek
2017-09-28 23:39 ` Nathan Sidwell
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2017-09-28 18:52 UTC (permalink / raw)
To: Jonathan Wakely, Jason Merrill, Nathan Sidwell; +Cc: libstdc++, gcc-patches
Hi!
On Wed, Sep 20, 2017 at 05:35:26PM +0100, Jonathan Wakely wrote:
> C++17 deprecates uncaught_exception in favour of uncaught_exceptions,
> so this adds the attribute.
>
> 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.
>
> Tested powerpc64le-linux, committed to trunk.
This broke a couple of tests with make check-c++-all, the following patch
should fix that.
Regtested on x86_64-linux and i686-linux, including make check-c++-all, ok
for trunk?
2017-09-28 Jakub Jelinek <jakub@redhat.com>
* g++.dg/eh/uncaught1.C: Add -Wno-deprecated for c++17.
* g++.dg/eh/uncaught2.C: Likewise.
* g++.dg/eh/uncaught3.C: Likewise.
* g++.dg/eh/uncaught4.C: Likewise.
* g++.old-deja/g++.mike/eh48.C: Likewise.
--- gcc/testsuite/g++.dg/eh/uncaught1.C.jj 2014-01-28 14:03:44.000000000 +0100
+++ gcc/testsuite/g++.dg/eh/uncaught1.C 2017-09-28 14:33:08.758343406 +0200
@@ -1,6 +1,7 @@
// PR libstdc++/10606
// { dg-do run }
// { dg-options "-fuse-cxa-get-exception-ptr" { target powerpc*-*-darwin* } }
+// { dg-additional-options "-Wno-deprecated" { target c++17 } }
#include <exception>
#include <cstdlib>
--- gcc/testsuite/g++.dg/eh/uncaught2.C.jj 2008-09-05 12:55:05.000000000 +0200
+++ gcc/testsuite/g++.dg/eh/uncaught2.C 2017-09-28 14:33:16.761250186 +0200
@@ -1,6 +1,7 @@
// { dg-do compile }
// { dg-final { scan-assembler-not "__cxa_get_exception" } }
// { dg-options "-fno-use-cxa-get-exception-ptr" }
+// { dg-additional-options "-Wno-deprecated" { target c++17 } }
#include <exception>
#include <cstdlib>
--- gcc/testsuite/g++.dg/eh/uncaught3.C.jj 2008-09-05 12:55:05.000000000 +0200
+++ gcc/testsuite/g++.dg/eh/uncaught3.C 2017-09-28 14:33:23.180175417 +0200
@@ -1,6 +1,7 @@
// { dg-do compile { target powerpc*-*-darwin* } }
// { dg-final { scan-assembler-not "__cxa_get_exception" } }
// { dg-options "-mmacosx-version-min=10.4" }
+// { dg-additional-options "-Wno-deprecated" { target c++17 } }
#include <exception>
#include <cstdlib>
--- gcc/testsuite/g++.dg/eh/uncaught4.C.jj 2014-01-28 14:03:44.000000000 +0100
+++ gcc/testsuite/g++.dg/eh/uncaught4.C 2017-09-28 14:33:29.811098178 +0200
@@ -1,5 +1,6 @@
// PR c++/41174
// { dg-do run }
+// { dg-additional-options "-Wno-deprecated" { target c++17 } }
#include <exception>
--- gcc/testsuite/g++.old-deja/g++.mike/eh48.C.jj 2008-09-05 12:54:56.000000000 +0200
+++ gcc/testsuite/g++.old-deja/g++.mike/eh48.C 2017-09-28 14:34:09.792632463 +0200
@@ -1,5 +1,6 @@
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
// { dg-options "-fexceptions" }
+// { dg-additional-options "-Wno-deprecated" { target c++17 } }
#include <exception>
#include <stdlib.h>
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PR libstdc++/81469 deprecate std::uncaught_exception for C++17
2017-09-28 18:52 ` Jakub Jelinek
@ 2017-09-28 23:39 ` Nathan Sidwell
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2017-09-28 23:39 UTC (permalink / raw)
To: Jakub Jelinek, Jonathan Wakely, Jason Merrill; +Cc: libstdc++, gcc-patches
On 09/28/2017 11:52 AM, Jakub Jelinek wrote:
> Hi!
>
> On Wed, Sep 20, 2017 at 05:35:26PM +0100, Jonathan Wakely wrote:
>> C++17 deprecates uncaught_exception in favour of uncaught_exceptions,
>> so this adds the attribute.
>>
>> 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.
>>
>> Tested powerpc64le-linux, committed to trunk.
>
> This broke a couple of tests with make check-c++-all, the following patch
> should fix that.
>
> Regtested on x86_64-linux and i686-linux, including make check-c++-all, ok
> for trunk?
ok, thanks
nathan
--
Nathan Sidwell
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-28 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 16:35 [PATCH] PR libstdc++/81469 deprecate std::uncaught_exception for C++17 Jonathan Wakely
2017-09-28 18:52 ` Jakub Jelinek
2017-09-28 23:39 ` Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).