You could implement them as static&#x2F;inline functions for compilers that lack the builtins (using a bunch of comparisons with SHORT_&#x2F;INT_MAX, ...) , which would be slower but for things explicitly meant as security check, probably worth the cost.<p>I&#x27;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 &quot;manual&quot; checks.