|
|
|
|
|
by steerablesafe
2016 days ago
|
|
> E.g. signed integer overflow did exactly what you expect in most compilers until fairly recently. How recently? Both gcc 4.1.2 (2007) and clang 3.0.0 (2011) optimizes `x+1 > x` to true for a signed int `x` on -O1. And it probably goes way back, these are just the oldest compilers I found on godbolt. https://c.godbolt.org/z/sdd15c |
|