3 ms·
I like integer overflow being UB. Makes it easier to check for by enabling a sanitizer. With it being defined as wrapping, it would be illegal for overflow to
by celrod 3y ago
I like integer overflow being UB. Makes it easier to check for by enabling a sanitizer.
With it being defined as wrapping, it would be illegal for overflow to cause a runtime trap.
Of course, rust mandates the trap on debug builds, which is a fine approach too.