QUESTION ON 2.95.2

Takis Psarogiannakopoulos takis@XFree86.org
Sat Dec 18 10:01:00 GMT 1999


Hello,

On Sat, 18 Dec 1999, Martin v. Loewis wrote:

> > What exactly do you mean with that?
>
> I'm talking about constructors of global objects. Please read a C++
> book for more details.
>               

Actually , as I was never very good in C++ I am reading a book 
i.e. Deitel & Deitel as well as the classic book of 
Stroustrup. But I am still unable to find why this is
happening in the mozilla code. Maybe my linker doesnt 
initialize correctly constrcutors some times? That is
why I am asking about the issue of building gcc -2.95.2
with -fgnu-linker or not.

> 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?        

I believe is after main started. I will check and come back
if this is not the case. But I think it is after main.

> 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.
>                               

Yes, that is probably the center of my issue.  

 
Regards,
Takis



More information about the Gcc mailing list