This is the mail archive of the
mailing list for the libstdc++ project.
Re: V3 static data in classes vs AIX
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: V3 static data in classes vs AIX
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 05 Jun 2001 16:03:58 +0100
- Cc: dje at watson dot ibm dot com, gdr at codesourcery dot com, bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
- References: <email@example.com><200106042144.RAA08754@makai.watson.ibm.com><20010604150529T.firstname.lastname@example.org>
>>>>> "Mark" == Mark Mitchell <email@example.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
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
Of course, we can run into similar trouble on ELF with -Bsymbolic...