compile/runtime testing for __cxa_atexit
Benjamin Kosnik
bkoz@redhat.com
Wed Aug 31 22:02:00 GMT 2005
Hey people. I'm working on getting better tests for resource cleanups
in mt_allocator.
Part of this testing is only useful for targets that have --enable-__cxa_atexit flipped.
However, there appears to be no way to currently tell at runtime if a
given host has enabled this, and it is being used. From a quick look at
the g++ testsuite, it looks like
dg-options "-fuse-cxa-atexit"
is being used. However, that's not really what I'm going for. I either
want a macro (GLIBCXX_HAVE___CXA_ATEXIT comes immediately to mind) or
something more elegant like the machinery used for threads/wchar_t/
locales, where if the underlying system doesn't hack it, the test is
not really run (ie is unsupported). The latter is more accurate I
think: that's what I'm currently working on.
Suggestions or ideas? Something I overlooked?
-benjamin
More information about the Libstdc++
mailing list