4 ms·
Signed overflow will still be undefined behavior even after the planned change (making signed integers 2's complement). This is explicitly mentioned in the pag
by moefh 8y ago
Signed overflow will still be undefined behavior even after the planned change (making signed integers 2's complement).
This is explicitly mentioned in the page linked in that tweet:
> Status-quo If a signed operation would naturally produce a value that is not within the range of the result type, the behavior is undefined. The author had hoped to make this well-defined as wrapping (the operations produce the same value bits as for the corresponding unsigned type), but WG21 had strong resistance against this.