This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: V3 static data in classes vs AIX
>>>>> "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