"not" doesn't work properly on bitpacked booleans
Original Reporter info from Mantis: Tomsod
-
Reporter name:
Original Reporter info from Mantis: Tomsod
- Reporter name:
Description:
Booleans in bitpacked record only occupy one bit, but "not" performed on them seems to negate at least the whole byte they're in. So, if the boolean in question is false, but something else in the same byte is non-zero, negating the boolean will yeild false still.
Steps to reproduce:
Compile and run the code in "Additional Information". It will output "FALSE" even though R.B is false as well.
Additional information:
var R: bitpacked record
A, B: boolean;
end;
begin
R.A := true;
R.B := false;
writeLn(not R.B);
end.
Mantis conversion info:
- Mantis ID: 30208
- OS: Linux
- OS Build: 4.2.5 (kernel)
- Platform: x86_64
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 33906 (#49f63d67)