utf8proc tries to respond to signed integer overflow after the overflow has already occurred. Because signed integer overflow is Undefined Behaviour in C, the compiler can replace the overflow branch by whatever it wants. An optimising compiler will typically elide it.