Hi Thaddy,
Attached a modified version of your original code (all bit manipulation is done with unsigned types).
Also an extensive test suite that tests all then methods you added for different bitness (even for 16-bit mode).
Its quite a bit more extensive than your test in the bugtracker.
It does all bit manipulation-methods (setbit, togglebit, clearbit, testbit) for all possible bits of a given type.
With my modifications the test program passes all tests.
When I have time, I will apply your last patch in the bugtracker to trunk and see if my tests pass.
Bart