Question about __attribute__ ((construtor))
Carlo Wood
carlo@alinoe.com
Wed Oct 15 16:01:00 GMT 2003
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>
More information about the Gcc-bugs
mailing list