How about keeping the current semantics, but adding __builtin_expect so that the code is optimised to assume the difference won't be greater than INT_MAX or less than INT_MIN? Presumably on 32bit the builtin_expect(diff_type <= INT_MAX) would be equivalent to what we have now, but on 64bit would be no worse.