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: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 04 Jun 2001 16:13:51 -0400
- cc: gdr at codesourcery dot com, bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
IBM xlC 188.8.131.52 actually produces a common symbol as well (for
class T instead of typename T). Your latest example does have a
definition, not a reference:
template <typename T> int S<T>::i;
This latest commentary really doesn't make sense to me. Why is
the compiler wrong and the library header right? It seems that you are
trying to replicate incorrect semantics that are being generated on
systems with WEAK symbol support.
Why are the multiple definitions correct? Yes, you can fake out
the compiler, but why is it correct for the compiler to *NOT* create
storage for a definition? Why should these multiple storage definitions
Do weak symbols specifically allow this type of use? Or is this
specific to late binding? I still do not understand the differences
between the semantics of COMMON and WEAK very well.
AIX does have System V-style "runtime linking", so maybe that
would provide the correct semantics.