On 11/6/20 8:34 AM, Martin Storsjö wrote: > On Fri, 6 Nov 2020, Liu Hao via Gcc-patches wrote: > >> 在 2020/10/29 下午3:56, Liu Hao 写道: >>> I forward it here for comments. >>> >>> Basing on the behavior of both GCC and Clang, `__cxa_thread_atexit` >>> is used to register the >>> destructor of thread_local objects directly, suggesting the first >>> parameter should have `__thiscall` >>> convention. >>> >>> libstdc++ used the default `__cdecl` convention and caused crashes on >>> 1686-w64-mingw32 (see >>> PR83562). But to my surprise, libcxxabi uses `__cdecl` too [1], but I >>> haven't heard any of relevant >>> reports so far. >>> >>> Original patch is attached in case you can't find it in gcc-patches. >>> > > FWIW, this patch looks good and correct to me, from a mingw perspective. > > // Martin Thanks pushed to gcc master branch as 7fc0f78c3f43af1967cb7b1ee8f4947f3b890aa2.