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 17:44:06 -0400
- cc: gdr at codesourcery dot com, bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
I just had a long discussion with the IBM compiler group about
this whole situation. I strongly advise you *not* to change comdat.
If I understand your proposal correctly, C++ static class members
with assignments would produce an object file definition while no
assignment would be changed from the current common symbol to a reference.
This is very dangerous and will break other programs. A definition needs
to be a definition.
As far as weak symbols, I am pretty sure that my ingestigation
over the weekend lead me to believe that it originally was intended for
functions (as your note states), but was expanded.
COMMON does not seem to be very different from WEAK other than
COMMON defaults to 0 initialization and WEAK allows any initialization.
I don't thikn that WEAK is going to solve this on AIX either
because of AIX's shared library behavior of binding symbols internally. I
think that I need to look at using AIX "runtime linking" which I was
hoping to avoid. That may allow the reference rewriting matching SVR4