QUESTION ON 2.95.2

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Dec 31 23:54:00 GMT 1999


> The peculiar thing is that this code works for Linux. That means 
> that who ever calls RegisterSelf in DG/UX does that as well in Linux.

You should know where RegisterSelf is called - it is your source code.
The question is: when is it called? Before or after main is started?

> So my question really will be how come in Linux is initialized 
> but in DG/UX not. If same actions are taken by mozilla during
> it initial startup (for both Linux DG/UX), then the compiler 
> gets something wrong. 

Not necessarily. In C++, global objects are initialized some time
before main() starts. The exact order in which they are initialized
may depend on the platform.

> > instead, run-time  initialization is needed. 
> 
> What exactly do you mean with that?

I'm talking about constructors of global objects. Please read a C++
book for more details.

Regards,
Martin



More information about the Gcc mailing list