This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __cxa_atexit question


Steve Ellcey wrote:
>>> No, I was thinking of putting actual definitions of __cxa_atexit and
>>> __cxa_finalize (and atexit) in libstdc++.
>> I don't think atexit is appropriate. However, the other two seem like
>> candidates. Without the atexit hooks seems kinda pointless tho.
> 
> Yes, without atexit I think it is pointless.  I will probably not follow
> up on this.

I think it's reasonable to conditionally include a C++-aware atexit,
__cxa_atexit, and __cxa_finalize in libsupc++, which is then
incorporated into libstdc++.  On a system where these functions are not
in the C library, there's no other way to build a conforming C++
implementation.  Other C++ compilers provide their own runtime libraries
on such platforms, so as to conform to the C++ standard; why shouldn't
we do the same?

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]