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


>>>>> Benjamin Kosnik writes:

Ben> include/bits/basic_string.tcc has:

Ben> template<typename _CharT, typename _Traits, typename _Alloc>
Ben> const typename basic_string<_CharT, _Traits, _Alloc>::size_type 
Ben> basic_string<_CharT, _Traits, _Alloc>::
Ben> _Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4;

Ben> So it's defined, or should be. Maybe implicit instantiations of class 
Ben> templates doesn't instantiate nested class static data on AIX?

	I think this is another example of the COMDAT problem.  G++
assumes that it can emit duplicate weak instantiations which will be
merged.  If a target does not have WEAK symbols, G++ currently does not
emit anything and it needs to be instantiated explicitly.

	This is why Mark is suggesting doing the same thing for static
class members.  I think that AIX "runtime linking" re-writing of the TOC
will merge those references and do the right thing.  I am dealing with too
many other fires to test this at the moment. 

	The question seems to be a choice of being completely consistent
(to the point of being painful for programmers) OR use COMMON symbols for
GNU/Linux/SVR4 compatibility as much as most platforms can implement.  I
currently am leaning toward the latter.

	I do not think that holding to the June 15 release date is
reasonable given the number of high priority bugs.  We are not allowing
any time for a real freeze and candidate release for testing because of
the significant changes still being implemented to address the high
priority bugs.

David


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