[cxx-abi-dev] Adding __cxa_thread_atexit() to the C++ ABI?

Matthew Dempsky matthew at dempsky.org
Wed May 14 04:36:46 UTC 2014


On Tue, May 13, 2014 at 8:18 PM, Jason Merrill <jason at redhat.com> wrote:
> Well, GCC supports lots of platforms that don't also use glibc.

Sure, but what's wrong with saying those platforms won't have proper
C++11 support until they implement __cxa_thread_atexit()?  Just like
how GCC supports (or used to support) platforms that don't have
__cxa_atexit() by using atexit() instead, and those platforms just
wouldn't have fully correct behavior.

Or just don't enable thread_local if __cxa_thread_atexit() isn't
available.  On platforms that don't support ELF TLS segments, GCC
prints a "thread-local storage not supported for this target" error
message when you try to use __thread.

But anyway, we've been arguing this back-and-forth a bit now. :)  I'd
love to hear some input from others on the list.  (And if not, I'll
probably fallback to "undefined behavior" if just for the sake of
getting it in the ABI.)


More information about the cxx-abi-dev mailing list