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]

static member initialization problems on Irix w1.0.3a


I am having a problem which I am having trouble tracking down.  I have a
large software project which compiles and runs correctly under
WinNT/VC++ 5.0 and also compile under EGCS 1.0.3a on Irix 6.3 but does
not run.  The problem seems to be that constructors are not always
called for some static class members and other static variables.  The
confusing thing is that they are called in some cases, but not all.  One
example is a global:

ofstream wsCERROR("ws.debug");


which shows up in a file which is a member of a library.  This
constructor is not called, though if I move this to the main program
file (global scope, outside of main()), it is called.

This particular example can be dealt with easily enough, but it is more
of a problem with some of the static class members.

Has anyone had this problem, or is there something wrong with my installation?

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael Tanenblatt                  Language Modeling Research Department
Bell Laboratories                   Tel +1 908 582-6456 / Fax +1 908 582-3306
600 Mountain Avenue, Rm 2D-435      Email: tanenbla@research.bell-labs.com
Murray Hill NJ 07974 USA            http://www.bell-labs.com/project/tts/


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