Re: [PATCH] libstdc++: use updated type for __unexpected_handler

2024-01-11 Thread Jonathan Wakely
On Thu, 11 Jan 2024 at 16:04, Marcus Hähnel wrote:
>
> Forwarding since I forgot to add gcc-patches in the original mail.
> Sorry for the noise.

And I forgot about this one, so thanks for the ping. I'll push it.


>
> -- >8 --
>
> Commit f4130a3eb545ab1aaf3ecb44f3d06b43e3751e04 changed the type of
> __expected_handler in libsupc++/unwind-cxx.h to be a
> std::terminate_handler to avoid a deprecated warning. However, the
> definition in eh_unex_handler.cc still used the old type
> (std::unexpected_handler) and thus causes a warning when compiling
> libstdc++ with -Wdeprecated-declarations (which is the default, for
> example, for clang).
>
> Adapt the definition to match the declaration.
>
> libstdc++-v3/ChangeLog:
> * libsupc++/eh_unex_handler: Adjust definition type to declaration.
> ---
>  libstdc++-v3/libsupc++/eh_unex_handler.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/libsupc++/eh_unex_handler.cc 
> b/libstdc++-v3/libsupc++/eh_unex_handler.cc
> index 0b7fa34e082..879585ee513 100644
> --- a/libstdc++-v3/libsupc++/eh_unex_handler.cc
> +++ b/libstdc++-v3/libsupc++/eh_unex_handler.cc
> @@ -25,5 +25,5 @@
>  #include "unwind-cxx.h"
>
>  /* The current installed user handler.  */
> -std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
> +std::terminate_handler __cxxabiv1::__unexpected_handler = std::terminate;
>
> --
> 2.42.0
>



Fwd: [PATCH] libstdc++: use updated type for __unexpected_handler

2024-01-11 Thread Marcus Hähnel
Forwarding since I forgot to add gcc-patches in the original mail.
Sorry for the noise.

-- >8 --

Commit f4130a3eb545ab1aaf3ecb44f3d06b43e3751e04 changed the type of
__expected_handler in libsupc++/unwind-cxx.h to be a
std::terminate_handler to avoid a deprecated warning. However, the
definition in eh_unex_handler.cc still used the old type
(std::unexpected_handler) and thus causes a warning when compiling
libstdc++ with -Wdeprecated-declarations (which is the default, for
example, for clang).

Adapt the definition to match the declaration.

libstdc++-v3/ChangeLog:
* libsupc++/eh_unex_handler: Adjust definition type to declaration.
---
 libstdc++-v3/libsupc++/eh_unex_handler.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/libsupc++/eh_unex_handler.cc 
b/libstdc++-v3/libsupc++/eh_unex_handler.cc
index 0b7fa34e082..879585ee513 100644
--- a/libstdc++-v3/libsupc++/eh_unex_handler.cc
+++ b/libstdc++-v3/libsupc++/eh_unex_handler.cc
@@ -25,5 +25,5 @@
 #include "unwind-cxx.h"
 
 /* The current installed user handler.  */
-std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
+std::terminate_handler __cxxabiv1::__unexpected_handler = std::terminate;
 
-- 
2.42.0



signature.asc
Description: This is a digitally signed message part