Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c++ Subject: Re: SUMMARY: C and C++ Keywords: C++ static object construction Message-ID: <658@taumet.com> Date: 5 Apr 91 17:51:19 GMT References: <1991Apr3.011032.14110@terminator.cc.umich.edu> <1990@godzilla.tcs.com> <1991Apr04.195944.17095@ism.isc.com> Organization: Taumetric Corporation, San Diego Lines: 20 billri@redwood.sos.ivy.isc.com (Bill Rizzi) writes: > Actually, cfront (AT&T C++ 2.1) places the call to _main() as the >first statement in the definition of C function main(). Just take a peek at >the generated C code. You'll see something like: >... main(...) { _main(); ... } > I don't know for sure that _main() is standard with all C++ >compilers, however. Different C++ compilers have different solutions for this. Some call a function equivalent to _main() but with a different name. Some use other means to achieve runtime initialization of static data. The ANSI C++ committee is addressing possible ways to standardize the static constructor/destructor problem in multilanguage environments. -- Steve Clamage, TauMetric Corp, steve@taumet.com