This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about __attribute__ ((construtor))


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]