This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
static member initialization problems on Irix w1.0.3a
- To: egcs-bugs at cygnus dot com
- Subject: static member initialization problems on Irix w1.0.3a
- From: Michael Tanenblatt <tanenbla at research dot bell-labs dot com>
- Date: Tue, 21 Jul 1998 17:32:35 -0400
- CC: tanenbla at research dot bell-labs dot com
- Organization: Bell Laboratories
- Reply-To: tanenbla at research dot bell-labs dot com
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/