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


	I have not had time to track down the exact lines in the headers
which create the problem and I have not had time to test the compiler with
your change.

	I suspect that the library header *does* have some form of
definition.  And that is exactly my point: the header has a definition
which the compiler is emitting correctly.  Why should the compiler be
changed to not allocate storage for a proper definition.  The problem is
that use of the header ends up generating multiple definitions.

	Why is it correct for the header to produce multiple definitions?
Why isn't this a problem on systems with weak symbols?  Your answer relies
on the fact that this works on systems with WEAK symbols and *NOT* on the
fact that the compiler is producing correct code.

	Just because it works, does not mean that it is correct.  IBM's
compiler generates a common symbol as well.  It seems that GCC is behaving
correctly and V3 is relying on some special behavior to merge multiple
definitions.  Does the definition of WEAK symbols specifically allow this,
or is this an issue of runtime binding of the symbols?

	Both multiple common symbols and multiple weak symbols are okay.

Thanks, David


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