question to the c experts (@johnregehr ?): Is a size_t overflow undefined behavior? and if yes, how do you check when doing a multiplication
-
-
The right check for a*b overflow is (a && b>SIZE_MAX/a). Modern compilers should compile this to "jc" or equiv.
-
mul;jc, that is.
- End of conversation
New conversation -
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.