This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[RFC] libstdc++/6214: Bitset High Priority regression
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 09 Apr 2002 00:08:03 +0200
- Subject: [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.