I understand there's a good chance the next standard will specify that signed integer overflow results in an unspecified value, which would match the behaviour of older compilers and what (IME) most programmers tend to expect.
Re:Zig 0.7.1 Released – 69 bugs fixed
by steerablesafe on Wednesday December 16, 2020 @06:29AM
(#25441392)
> I understand there's a good chance the next standard will specify that signed integer overflow results in an unspecified value
Do you have a source for this?
The thing is it's very hard to draw the line once you go that route. Different people expect different things from undefined behavior. The best thing is to not expect anything sane. And if you are unhappy about certain undefined behaviors in the standard then it's better to push the standard to define more behavior. Certain unnecessary undefined behaviors get resolved with newer standards, although I would expect significant pushback on defining the behavior signed integer overflow.