4 ms·
No kidding: this is a problem with signed integers as well: C allows signed magnitude, ones' complement, and two’s complement representations, but no mainstream
by simonbyrne 8y ago
No kidding: this is a problem with signed integers as well: C allows signed magnitude, ones' complement, and two’s complement representations, but no mainstream compiler supports anything other than two's complement.
> In short, the only machine the author could find using non-two’s complement are made by Unisys. Nowadays they emulate their old architecture using x86 CPUs for customers who have legacy applications which they’ve been unable to migrate.
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0907r0.html#survey http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p090...
- skookumchuck 8y agoThe same goes for bytes being any size. No compiler supports that outside of some specialized DSPs, and essentially no C software would even work on such machines unless it was specifically written for them.
- saagarjha 8y agoThat's why there's a proposal for requiring two's complement integers in the next version of the standard for C.