This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in STL implementation
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bug in STL implementation
- From: Martin Ohmacht <ohmacht at mst dot uni-hannover dot de>
- Date: Fri, 29 Sep 2000 11:22:12 +0200 (MET DST)
- Organization: MST [http://www.mst.uni-hannover.de]
The STL implementation contains a small bug. In the single word
spezialization of bitset, a reference to the number of words variable _Nw
is used, but that variable is not defined in that context. As is is always
1 in this context, simply remove it.
Martin
Martin Ohmacht Mikroelektronische Schaltungstechnik
mailto:ohmacht@mst.uni-hannover.de Universität Hannover
http://www.mst.uni-hannover.de/~ohmacht Germany
*** /usr/local/gnu/include/g++-3/bitset Tue Mar 21 19:25:22 2000
--- /home/home1/ohmacht/bitset Fri Sep 29 11:12:23 2000
*************** _Base_bitset<1, _WordT>::_Base_bitset(un
*** 435,441 ****
{
_M_do_reset();
const size_t __n = min(sizeof(unsigned long)*CHAR_BIT,
! __BITS_PER_WORDT(_WordT)*_Nw);
for(size_t __i = 0; __i < __n; ++__i, __val >>= 1)
if ( __val & 0x1 )
_M_w |= _S_maskbit(__i);
--- 435,441 ----
{
_M_do_reset();
const size_t __n = min(sizeof(unsigned long)*CHAR_BIT,
! __BITS_PER_WORDT(_WordT));
for(size_t __i = 0; __i < __n; ++__i, __val >>= 1)
if ( __val & 0x1 )
_M_w |= _S_maskbit(__i);