V3 static data in classes vs AIX
Jason Merrill
jason_merrill@redhat.com
Wed Jun 6 05:31:00 GMT 2001
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
Jason> Non-ELF targets that are not broken in this way can still
Jason> benefit from automatic instantiation of zero- or
Jason> dynamically-initialized template statics.
> This is where we critically disagree. I don't think that users are
> benefiting from the current behavior; we're being bizarrely
> inconistent without completely solving their problem.
> Maybe I would feel differently if you convince me that there a high
> percentage of programs that would need explicit instantiations under
> my scheme do not need them *at all* under the current scheme, i.e., do
> not have any variables that are not zero-initialized. But, I know
> that in my own code such a program would be very rare.
Note the "or dynamically-initialized". The status quo gives users the
option of replacing a '= 1' with a '= int_dummy (1)' to force runtime
initialization. Or, I suppose, the compiler could do it for them, in which
case we wouldn't need to require explicit instantiation at all.
Jason
More information about the Libstdc++
mailing list