In my current 32-bit application, I check (very occasionally) for overflow by doing operations on 64-bit integers.
However, on 64-bit systems there does not seem to be a standard 128-bit integer. Is there a simple way of checking for overflow, or a way of getting 128-bit integers, which works on all OSes and compilers?
I tried using GMP as a more generic solution, but it is a little heavyweight for my requirements.
Efficiency is not too important, no processor specific-ASM is.
Much of the discussion in this question applies:
How to detect integer overflow?
Many of the techniques used for 32-bit overflow chacking apply to 64-bits as well (not all of the techniques discussed use the next larger integer type to handle the overflow).