Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Undefined behavior in C is a reading error. Parent comment
C++ recently decided to not make signed overflow defined, despite having the explicit opportunity to do so. Here is the reasoning:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p090...
> Performance concerns, whereby defining the behavior prevents optimizers from assuming that overflow never occurs;
> Implementation leeway for tools such as sanitizers;
> Data from Google suggesting that over 90% of all overflow is a bug, and defining wrapping behavior would not have solved the bug.
Presumably, data from Google disproves your assertion that the amount of code that breaks due to signed overflow being UB is huge.
There are no comments on this comment yet.
C++ recently decided to not make signed overflow defined, despite having the explicit opportunity to do so. Here is the reasoning:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p090...
> Performance concerns, whereby defining the behavior prevents optimizers from assuming that overflow never occurs;
> Implementation leeway for tools such as sanitizers;
> Data from Google suggesting that over 90% of all overflow is a bug, and defining wrapping behavior would not have solved the bug.
Presumably, data from Google disproves your assertion that the amount of code that breaks due to signed overflow being UB is huge.