[PING][PATCH] libstdc++: cxxabi.h: Remove guards around _GLIBCXX_CDTOR_CALLABI

Zhongteng Gui dragon-archer@outlook.com
Thu Dec 3 14:42:28 GMT 2026


Gentle ping.

On 2026/11/20 00:45, Zhongteng Gui wrote:
> From eae63474ac78190bb82544bec85c956ab9b6a9e5 Mon Sep 17 00:00:00 2001
> From: Zhongteng Gui <dragon-archer@outlook.com>
> Date: Fri, 20 Nov 2026 00:38:51 +0800
> Subject: [PATCH] libstdc++: cxxabi.h: Remove guards around
>  _GLIBCXX_CDTOR_CALLABI
> 
> This is guaranteed to be defined by cxxabi_init_exception.h, which is
> always included by cxxabi.h.  Besides, __cxa_throw already uses
> _GLIBCXX_CDTOR_CALLABI unconditionally, so it is safe to do the same for
> __cxa_atexit and __cxa_thread_atexit.
> 
> libstdc++-v3/ChangeLog:
> 
> 	* libsupc++/cxxabi.h: Drop #ifdef _GLIBCXX_CDTOR_CALLABI around
> 	__cxa_atexit and __cxa_thread_atexit.
> 
> Signed-off-by: Zhongteng Gui <dragon-archer@outlook.com>
> ---
>  libstdc++-v3/libsupc++/cxxabi.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
> index 244b21fc9db..32a9db0ddd6 100644
> --- a/libstdc++-v3/libsupc++/cxxabi.h
> +++ b/libstdc++-v3/libsupc++/cxxabi.h
> @@ -127,22 +127,14 @@ namespace __cxxabiv1
>  
>    // DSO destruction.
>    int
> -#ifdef _GLIBCXX_CDTOR_CALLABI
>    __cxa_atexit(void (_GLIBCXX_CDTOR_CALLABI *)(void*), void*, void*) _GLIBCXX_NOTHROW;
> -#else
> -  __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
> -#endif
>  
>    void
>    __cxa_finalize(void*);
>  
>    // TLS destruction.
>    int
> -#ifdef _GLIBCXX_CDTOR_CALLABI
>    __cxa_thread_atexit(void (_GLIBCXX_CDTOR_CALLABI *)(void*), void*, void *) _GLIBCXX_NOTHROW;
> -#else
> -  __cxa_thread_atexit(void (*)(void*), void*, void *) _GLIBCXX_NOTHROW;
> -#endif
>  
>    // Pure virtual functions.
>    void



More information about the Libstdc++ mailing list