Re:The Wrong Abstraction (2016)
by MauranKilom on Sunday May 09, 2021 @03:13PM
(#27098789)
Presumably something like the representation of signed numbers being implementation defined (instead of two's complement as is virtually always the case nowadays).
[ Parent
| on HN ]
Re:The Wrong Abstraction (2016)
by MaxBarraclough on Sunday May 09, 2021 @04:45PM
(#27099554)
I know this doesn't address the point about the C standard itself, but:
• GCC and Clang both accept the -fwrapv argument, causing the compiler to guarantee that signed overflow will wrap, like in Java
• The latest C++ standard mandates that signed integer types use two's complement representation (signed overflow remains undefined behaviour)