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]
Other format: [Raw text]

[RFC] libstdc++/6214: Bitset High Priority regression


Hi all,

Peter Schmid just submitted this PR which represent a serious 
regression. This is a further reduced testcase:

#include <bitset>

int main()
{
  std::bitset<1> bs;

  bs.count();
}

paolo:~> g++ bug6214.cc
/tmp/ccdqYgbC.o: In function 
`std::_Base_bitset<(unsigned)1>::_M_do_count() const':
/tmp/ccdqYgbC.o(.gnu.linkonce.t._ZNKSt12_Base_bitsetILj1EE11_M_do_countEv+0x2f): 
undefined reference to `std::_Bit_count<(bool)1>::_S_bit_count'
collect2: ld returned 1 exit status

Therefore, everything goes /as if/ the definition were missing from 
bitset.cc, that is, as if we had, overall:

template<bool __dummy>
struct _Bit_count {
  static unsigned char _S_bit_count[256];
};

/*
template<bool __dummy>
unsigned char _Bit_count<__dummy>::_S_bit_count[];
*/

int main() {
  int __result = _Bit_count<true>::_S_bit_count[0];
}

Thoughts?
Ciao, Paolo.









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