GCC: is there a way to tell a compiler what range of number I expect? For instance there's a uint8_t in range [2, 17]. I expect the compiler will optimize code for that range and consider out-of-range values as undefined. #cpp
-
Show this thread
-
-
Replying to @RichFelker @pshufb
Why not shorten it to 0/(x >= 2 && x <= 17);
1 reply 0 retweets 0 likes
Because I like the idiom for "undefined" that you can also drop in case labels, etc.
9:54 PM - 21 Mar 2018
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.