While we're at it, should C++ also specify:
-
-
I just presented “signed integers are two’s complement” http://wg21.link/p0907r0 to a joint session of C++ numerics and undefined behavior groups! Broad support, but they want to keep UB on overflow (and have separate type or operator for wrap). I’ll update the paper
10 replies 10 retweets 45 likesShow this thread -
Not only is the C++ standards committee happy to make signed integers two's complement in C++20 with http://wg21.link/p0907 , the *C standards committee* voted to do the same thing for the next version of C!
I just have to write the wording.
8 replies 73 retweets 194 likesShow this thread -
Replying to @jfbastien
Does this mean conversions to signed types will be well-defined as modular reduction (e.g. (int)-1U==-1)?
1 reply 0 retweets 2 likes -
Replying to @RichFelker
For C++ yes, for C they asked for more targeted papers for ~each bullet point I had in C++. I think some of the effects of the C++ wording wasn’t clear to the C committee, and I’m not there in person to explain. So maybe? I’ll certainly try to get the same effects as C++.pic.twitter.com/N5lS9UkrWt
2 replies 0 retweets 3 likes -
Replying to @jfbastien
That sounds backwards. Signed to unsigned was always well-defined as modular reduction. It's conversion to signed where the value is out of range (whether because it's a larger unsigned value or a higher-rank signed value) that was "implementation-defined conversion or signal".
2 replies 0 retweets 2 likes -
Replying to @RichFelker
OK second try with wording instead (some documentation out of date
)pic.twitter.com/iWYjzHmYbM
2 replies 0 retweets 2 likes -
-
As long as we can call it JFC instead of "boring C", I'm down.
1 reply 0 retweets 4 likes -
JFC, look at that UB!
2 replies 0 retweets 4 likes
And JFB can be your updated version of the B language. :-)
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.