Re:Why Does Calloc Exist?
by klodolph on Sunday November 13, 2022 @04:36PM
(#33587595)
The fact that signed overflow is undefined is unfortunately something that is necessary for certain optimizations to be valid. You can, for example, try `-fwrapv` or `-ftrapv` on GCC, but if you run through an extensive benchmark suite you’ll see regressions.
Not everyone cares about the benchmarks, but enough do.
Not everyone cares about the benchmarks, but enough do.