Avoid undefined behavior in BITFIELD implementation.
Probably there is no compiler that will actaully break the code or raise a signal for unsigned -> signed overflowing conversion, still it was apparently possible to write it in a more correct way. All tests passing.
Please register or sign in to comment