]> git.saurik.com Git - bison.git/commitdiff
(bitset_reset): Do not assume that bitset_word is
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Oct 2002 05:43:35 +0000 (05:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Oct 2002 05:43:35 +0000 (05:43 +0000)
the same width as int.  This reapplies a hunk of the 2002-08-12 patch
<http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
which was inadvertently undone by the 2002-09-30 patch.

lib/bitset.h

index 420ad88eef359aa841f1e874f5b906dba73f7ab7..cfafcaf4480c82bc146175cfd34f0b460d6f14e6 100644 (file)
@@ -167,7 +167,8 @@ do                                                                  \
   bitset_windex _offset = _index - (bset)->b.cindex;           \
                                                                \
   if (_offset < (bset)->b.csize)                               \
-    (bset)->b.cdata[_offset] &= ~(1 << (_bitno % BITSET_WORD_BITS));   \
+    (bset)->b.cdata[_offset] &=                                        \
+       ~((bitset_word) 1 << (_bitno % BITSET_WORD_BITS));      \
   else                                                         \
     BITSET_RESET_ ((bset), _bitno);                            \
 } while (0)