------- Additional Comments From sabre at nondot dot org 2005-04-11 19:40 ------- This code from stl_bvector.h is the problem:
void _M_incr(ptrdiff_t __i) { difference_type __n = __i + _M_offset; _M_p += __n / _M_word_bit; __n = __n % _M_word_bit; if (__n < 0) { _M_offset = (unsigned int) __n + _M_word_bit; --_M_p; } else _M_offset = (unsigned int) __n; } Note that the division and mod is performed on a signed __n value. If it were unsigned, the optimizer could trivially turn it into shift/and ops. -Chris -- What |Removed |Added ---------------------------------------------------------------------------- CC| |sabre at nondot dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16611