This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: V3 static data in classes vs AIX


>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:

> I'm proposing is that we not define *any* template static data
> members.  We already do not define ones that are explicitly
> initialized -- but we try to be clever and do define (using COMMON)
> variables that are defined, but not explicitly initialized.

> Even if it does not fix your problem, the change I'm suggesting
> *cannot* make the compiler more broken.

I disagree.  The bug here is that COMMON symbols are not combined between
shared libraries by default on AIX.  This will break anything that uses
COMMON, not just this use for templates.

Non-ELF targets that are not broken in this way can still benefit from
automatic instantiation of zero- or dynamically-initialized template
statics.

I think it would make sense to add a target macro for AIX to say that
COMMONs are not always combined, and conditionally disable the code in
question.

Of course, we can run into similar trouble on ELF with -Bsymbolic...

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]