https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83133
--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Fri, 24 Nov 2017, maxim.yegorushkin at gmail dot com wrote: > This code underflows a signed integer, which is undefined behaviour, if I am > not mistaken. So, this would not be a valid example, would it? It's valid to call a function in another file compiled with another compiler that follows the ABI, or compiled with -fwrapv, or not written in C at all. The ABI means you can't assume anything about what a called function does with OF, unless you know the function is called from the same translation unit and know that it has been compiled to do particular things with OF, and can't assume anything about the value of OF on entry, unless it's a static function and you know about what all the callers do.