This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Question about __attribute__ ((construtor))
- From: Carlo Wood <carlo at alinoe dot com>
- To: Jeroen Benckhuijsen <jeroen at themindconnection dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Oct 2003 18:00:58 +0200
- Subject: Re: Question about __attribute__ ((construtor))
- References: <1066210417.2700.14.camel@localhost.localdomain>
On Wed, Oct 15, 2003 at 11:33:38AM +0200, Jeroen Benckhuijsen wrote:
> My questions are:
> (1) How is the order determined for functions defined with __attribute__
> ((constructor)) with respect to normal variable initialization and other
> functions defined with the same attribute?
>
> (2) Is it possible to change or correct this order?
This is not a bug. The order is not specified and will differ between
compiler versions, even between versions from the same source (ie, gcc).
See also the FAQ at
http://users.utu.fi/~sisasa/oasis/cppfaq/ctors.html#[10.9]
and following paragraphs.
--
Carlo Wood <carlo@alinoe.com>