I see reports that ((int64_t)x >> 63) is undefined behaviour in C. Ok. Fine. Is there an equivalent that is somehow “defined”? I expect my hardware to use 2-complement. // cc @johnregehr
-
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
Replying to @johnregehr @lemire
I thought right shifting a negative number is implementation defined.
1 reply 0 retweets 0 likes -
-
This Tweet is unavailable.
Replying to @johnregehr @lemire
For xbitmanip I use C code to formally define the behavior of instructions. For that I'm trying to avoiding implementation defined behavior for obvious reasons.pic.twitter.com/29Wn5baIzT
2:54 PM - 30 Nov 2018
0 replies
0 retweets
3 likes
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.