This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: static constructors/destructors and atexit (Re: p2736.C Is dtor order guaranteed?)
- To: Marco Franzen <Marco dot Franzen at Thyron dot com>
- Subject: Re: static constructors/destructors and atexit (Re: p2736.C Is dtor order guaranteed?)
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 25 Aug 2000 16:06:27 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <00082515321800.00557@Maidavale>
On Aug 25, 2000, Marco Franzen <Marco.Franzen@Thyron.com> wrote:
> Suppose a function-local static object has been destroyed (which means we
> are currently working on static destructors) and the function is called
> again (passing control through the initialisation of that object).
> Would that object (have to be) constructed and destroyed again or is that
> undefined behaviour?
I don't recall anything in the standard referring to this situation,
so I vote for undefined behavior :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me