With this, I believe I have used ffs everywhere possible. When gnulib have fls* support, we will be able do the same for bitset_list_reverse, but I'm not sure it's a frequent need.
FWIW, I have run successfully the test suite of Bison on every single bitset implementation. Cheers! Akim Demaille (6): bitset: be sure to always return a value bitset: check empty and full bitsets bitset: use ffs where possible in the table implementation bitset: use ffs where possible in the vector implementation bitset: tests: try harder to break it bitset: tests: exercise the stats too ChangeLog | 39 +++++++++++++++++ lib/bitset/array.c | 10 ++--- lib/bitset/stats.c | 8 +++- lib/bitset/table.c | 104 +++++++++++--------------------------------- lib/bitset/vector.c | 57 ++++++++++-------------- tests/test-bitset.c | 88 ++++++++++++++++++++++++++++++++----- 6 files changed, 176 insertions(+), 130 deletions(-) -- 2.29.2