This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: PATCH: Disable dynamic allocation in atexit


Schwarz, Konrad wrote:

> Why doesn't the compiler create calls to the destructors such that they
> get called automatically by the _fini function?  What else is it there
> for?

The C++ standard requires the destructors be run in the opposite order
of initialization, interleaved with functions registered by the user
with atexit, and with destructors for function-local static objects.
There's no way to know the full order at link time.

-- 
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]