Please CC libstd...@gcc.gnu.org for all libstdc++ patches, as per https://gcc.gnu.org/lists.html
On 11/03/20 21:24 -0700, Fangrui Song wrote:
Alternatively, we can delete it, because no user code should call it. It may be weird that libc is expected to define this function. This function is a language runtime interface that has nothing to do with a libc.
It's coupled with __cxa_atexit, and the ABI says: "It is expected that implementations supporting both C and C++ will integrate this capability into the libc atexit implementation so that C-only DSOs will nevertheless interact with C++ programs in a C++-standard-conforming manner."
--- libstdc++-v3/libsupc++/cxxabi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h index 50298205daa..000713ecdf8 100644 --- a/libstdc++-v3/libsupc++/cxxabi.h +++ b/libstdc++-v3/libsupc++/cxxabi.h @@ -127,7 +127,7 @@ namespace __cxxabiv1 int __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW; - int + void __cxa_finalize(void*);
The change is correct, but I think we should wait for stage 1 (after the GCC 10 release) to apply it. If I forget, please remind us in a couple of months.