This has got to be a compiler bug, right? -ftrapv should really be checking this add. https://godbolt.org/g/NeEqeZ
-
-
Replying to @stevecheckoway
Isn't -ftrapv documented as not-actually-working? I think you need to version in ubsan to actually reliably catch overflow UB.
2 replies 0 retweets 0 likes -
Replying to @RichFelker @stevecheckoway
Also it works if you switch from ancient gcc version to a modern one.
2 replies 0 retweets 1 like -
Replying to @RichFelker @stevecheckoway
also note the better code from -fsanitize vs. -ftrapv https://godbolt.org/g/GZvBk4
1 reply 0 retweets 4 likes -
and also that they're presumably never going to fix this https://godbolt.org/g/w9Dt1C
2 replies 1 retweet 1 like -
Replying to @johnregehr @RichFelker
Wow. I would not have expected that.
2 replies 0 retweets 0 likes -
Replying to @stevecheckoway @RichFelker
if you wrote a compiler that ran the constant folder really early you would have expected it :)
3 replies 0 retweets 4 likes
Replying to @johnregehr @stevecheckoway
That's also why they have loads of unfixable floating point bugs...
9:59 AM - 11 Sep 2017
0 replies
0 retweets
0 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.