3 ms·
Wrapping on unsigned integer overflow is not specific to C at all and exists in most languages (unlike signed overflow which is UB in C).
by citrin_ru 5y ago
Wrapping on unsigned integer overflow is not specific to C at all and exists in most languages (unlike signed overflow which is UB in C).
- orthecreedence 5y agoCommon lisp wins again... ;)
- jimmyed 5y agoLisp won't work in software like HaProxy, which needs to be highly highly performant.
- pjmlp 5y agoRight, a full graphical workstation OS or a next gen multicore cluster isn't quite the same.
- orthecreedence 5y ago> Lisp won't work in software like HaProxy Not with that attitude.
- pjmlp 5y agoExcept other languages do have options for handling checked arithmetic, regardless of the default. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/checked https://docs.microsoft.com/en-us/dotnet/csharp/language-refe... https://dlang.org/phobos/core_checkedint.html https://dlang.org/phobos/core_checkedint.html https://devblogs.microsoft.com/cppblog/arithmetic-overflow-checks-in-c-core-check/ https://devblogs.microsoft.com/cppblog/arithmetic-overflow-c... https://docs.adacore.com/spark2014-docs/html/ug/en/source/overflow_modes.html https://docs.adacore.com/spark2014-docs/html/ug/en/source/ov... https://docwiki.embarcadero.com/RADStudio/Sydney/en/Overflow_checking_(Delphi) https://docwiki.embarcadero.com/RADStudio/Sydney/en/Overflow... https://doc.rust-lang.org/book/ch03-02-data-types.html https://doc.rust-lang.org/book/ch03-02-data-types.html