TIL POSIX forbids (probably accidentally) ones complement and sign/magnitude int.https://stackoverflow.com/a/48012314/379897 …
-
Show this thread
-
Replying to @RichFelker
I think that there is an error, there. -2^31 may just be a trap representation, even for int32_t.
1 reply 0 retweets 0 likes -
Replying to @gustedt
No, intN_t is explicitly required to be full range 2s complement.
1 reply 0 retweets 1 like -
Replying to @RichFelker
Yes, but full range 2's complement may have the bit pattern with 1 and then all 0s as a trap representation. This is explicitly stated in 6.2.6.2 p2 towards the end.
2 replies 0 retweets 0 likes
Replying to @gustedt
No, "full range" means not that case. In particular INTN_MIN is required to be a negated power of two. See 7.20.2.1 "Limits of exact-width integer types".
1:32 PM - 29 Dec 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.