GCC has builtins for overflow-detecting arithmetic operations, and has done for a while. These generally compile down to one of the jump instruction flavours on x86.
https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins...
https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins...
I've used them to replace explicit checks for overflow in some DSP related code which tried to implement saturation. The gcc builtins also were much faster than tedious "manual" checks.