Repository navigation
Heads up: this release changes how &, ^ and | bind against each other. If you have expressions that mix them without parentheses, check them: 3 ^ 1 & 2 now gives 3, the same as a C
compiler, where earlier releases gave 2.
Enhancements:
- Unary plus and minus in expressions: -5, 5 * -2 and 10 - -2 evaluate instead of being rejected. On the command line, separate a leading minus with --: bitwise -- '-5'
- README documents the operators that actually exist, with their precedence, and which C operators are not supported
- Added CONTRIBUTING.md, and filled in ChangeLog, NEWS and AUTHORS
Bug Fixes:
- &, ^ and | now have the C precedence order, where & and ^ used to share a level
- Numbers that don't parse cleanly are now refused instead of guessing: 12a used to evaluate as 12, a bare 0x or 0b as 0, and a literal past UINT64_MAX as UINT64_MAX
- Shifts and BIT() at or past the width of the value give 0, instead of an answer computed from a masked shift count: 1 << 64 used to be 1, and 1 << 200 used to be 256
- Fixed a stack buffer overflow on tokens longer than 64 characters, reachable from both the command line and the : prompt
- Radix64 output now matches the system l64a(); a fallback shim was overriding libc and printing a different alphabet
- Parse errors no longer corrupt the curses display
- Fixed the ASCII line of the conversion output on big-endian hosts
Build and testing:
- make distcheck works; VPATH builds could not find the headers in inc/ at all
- -Wall -Wextra are on by default, and --enable-asan, --enable-ubsan and --enable-fuzzer join the existing options
- Tests for number parsing, shift edges and long tokens, plus a libFuzzer harness over the expression parser
- CI builds on Linux, macOS and Windows/msys2, and runs distcheck, the sanitizers and a bounded fuzzing run on every push
Full Changelog: v0.60...v0.70