2 ms·
Signed integers in C don't wrap around. That's undefined behavior. Unsigned integers behave modulo 2^n, so if you want wrap around in C you should be using unsi
by wahern 10y ago
Signed integers in C don't wrap around. That's undefined behavior. Unsigned integers behave modulo 2^n, so if you want wrap around in C you should be using unsigned integers. Any C compiler to WebAssembly would have to implement unsigned behavior regardless of the semantics of WebAssembly's native unsigned operations.
For information on the semantics of WebAssembly arithmetic, see
https://github.com/WebAssembly/design/blob/master/Semantics.md#32-bit-integer-operators https://github.com/WebAssembly/design/blob/master/Semantics....
For other information about WebAssembly start here
https://github.com/WebAssembly/design/ https://github.com/WebAssembly/design/