This is the mail archive of the gcc@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: order of constructors


On Tue, Dec 02, 2003 at 04:04:42PM -0800, Jim Wilson wrote:
> Peter Barada wrote:
> > Is there any way to control the order of static constructors so that
> > some that access other functions are done after those functions
> > intializing fucntions are done?
> 
> The C++ front end supports an init_priority attribute.  This is 
> documented in the manual.

If you require portable C++ code, arranging that the static constructors
that have an order dependency are in the same file will enforce an ordering.


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