This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26723] invocation order of functions registered with atexit() not as expected
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2006 21:28:36 -0000
- Subject: [Bug c++/26723] invocation order of functions registered with atexit() not as expected
- References: <bug-26723-8375@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-16 21:28 -------
Can you give the output of "gcc -v"?
This is the output I get:
FIRST::FIRST()
SECOND::SECOND()
whatever
@post_exit
SECOND::~SECOND()
FIRST::~FIRST()
@pre_exit
--enable-__cxa_atexit is required to get this behavior, otherwise you get the
wrong behvaior due to deconstructors running at the wrong time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26723