question to the c experts (@johnregehr ?): Is a size_t overflow undefined behavior? and if yes, how do you check when doing a multiplication
-
-
Replying to @hanno @johnregehr
size_t is unsigned, so aiui it's not undefined behavior, but probably not what you want
1 reply 0 retweets 0 likes -
Replying to @l_zzi_ @johnregehr
I found sources telling me that whether size_t is signed/unsigned is not defined
2 replies 0 retweets 0 likes
OTOH allocating a value larger than std::numeric_limits<std::ptrdiff_t>::max() is undefined behavior.
2:56 PM - 23 Feb 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.