This is the mail archive of the 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

>>>>> Gabriel Dos Reis writes:

Gabriel> Excuse my naivety, but is there any reason it -should- produce the
Gabriel> common symbol? 

	No, it should not.

	The problem is that various testsuite cases *are* producing common
symbols which is a duplicate definition of the variable.

	So far my testcase is down to

#include <string>
#include <sstream>

  std::ostringstream os0;
  std::string str03 = os0.str();
  return str03;

int main()
  return 0;

which produces warnings like:

ld: 0711-224 WARNING: Duplicate symbol: std::string::_S_empty_rep_storage
ld: 0711-224 WARNING: Duplicate symbol: std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::id

	Something is wrong with the V3 headers (or with the G++ compiler)
that including the headers generates definitions of those static class
members instead of just references, as my simple example produces.

Thanks, David

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