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


	IBM xlC 3.6.6.0 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
be merged?

	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.

David


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