[Bug c++/72768] Potential bug about the order of destructors of static objects and atexit() callbacks in C++?

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Aug 1 20:00:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72768

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to lh_mouse from comment #0)
> Notwithstanding the vagueness of 'the completion of the initialization of an
> object',

The question hinges entirely on the definition of that term.

Arguably the object is not completely initialized until the principal
constructor returns.

And as pointed out on the mailing list, other compilers do the same.


More information about the Gcc-bugs mailing list