Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!milton!sumax!polari!rwing!seaeast!sunbrk!Usenet From: Greg.Comeau@sunbrk.FidoNet.Org (Greg Comeau) Newsgroups: comp.lang.c++ Subject: Re: Initializing Global Objects Message-ID: <675518012.59@sunbrk.FidoNet> Date: 28 May 91 18:54:40 GMT Sender: Usenet@sunbrk.FidoNet.Org Lines: 27 Reply-To: comeau@csanta.attmail.com (Greg Comeau) In article <750@taumet.com> steve@taumet.com (Stephen Clamage) writes: :Cay's analysis reflects current implementations, but not anything in the :language definition. The language definition makes no distinction between :the initialization of : int i = 1; // value can be part of load image :and : extern int j, k; : class C { C(int, int); ... }; : C c(j, k); // value cannot be part of load image :The requirement is merely that both initializations be complete before :the first statement of main() is executed. That also sorta reflects current implementation though as that is only 1/2 the requirement accto ARM p19: "Such initializations may be done before the first statement of main() or deferred to any point in time before the first use of a function or object defined in that translation unit." - Greg -- Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418 Producers of Comeau C++ 2.1 Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421 Voice:718-945-0009 / Fax:718-441-2310 * Origin: Seaeast - Fidonet<->Usenet Gateway - sunbrk (1:343/15.0)