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


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

static constructors/destructors and atexit


The C++ front end is using atexit() to schedule destruction of static
local objects.  However, a conforming atexit() implementation need only
handle 32 atexit() calls.  Since an atexit() call is made for each and
every object with a destructor, that only allows 32 objects.  We've hit
this limit.

Could the scheduling of these functions be done some other way?  Otherwise,
should NEED_ATEXIT be defined for more ports?

We've made a local solution which essentially makes another atexit()-like
function (cdtoratexit()) which the static scheduler uses instead of the
real atexit().  cdtoratexit() calls atexit() once.


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