V3 static data in classes vs AIX

Mark Mitchell mark@codesourcery.com
Wed Jun 6 06:28:00 GMT 2001


>>>>> "Jason" == Jason Merrill <jason_merrill@redhat.com> writes:

    Jason> Note the "or dynamically-initialized".  The status quo
    Jason> gives users the option of replacing a '= 1' with a '=
    Jason> int_dummy (1)' to force runtime initialization.  Or, I

Here, `int_dummy' is `int int_dummy (int i) { return i; }'?

    Jason> suppose, the compiler could do it for them, in which case
    Jason> we wouldn't need to require explicit instantiation at all.

That could result in a change in semantics, at least relative to ELF
systems -- the order of initialization would be subtly different.
And, of course, there's the additional cost of executing the run-time
code.  I guess I just don't see this as particularly viable, either
for users to do or for us to to do for them.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Libstdc++ mailing list