Re:C Portability Lessons from Weird Machines
by isomel on Tuesday February 22, 2022 @02:02AM
(#30424808)
> code that erroneously assumes those to be true in theory isn’t portable, but in practice is.
Be careful about undefined behaviour still. Even if your architecture have defined semantic, the compiler might still not assume them.
And newer C standards code may even unbreak such code. Ints already are two’s complement in the latest version of C++ and will be in the next version of C, for example.