This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: __cxa_atexit question
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: Sun, 14 May 2006 13:29:36 -0700
- Subject: Re: __cxa_atexit question
- References: <200605102102.OAA20639@hpsje.cup.hp.com>
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