Detect overflow from 64 bit addition on 32 bit machine with signed values

88 views Asked by At

In this post below 64 bit addition is achieved on a 32 bit machine. However it is using unsigned values for its overflow detection and i'm currently limited to only signed values. Is the post below possible with signed values?

https://stackoverflow.com/a/1652673/6947289

Detecting signed overflow in C/C++ Explains how to check if a int has overflowed. The same comparison does not work when used on the left and right side of the 64 bit value when doing the 32 bit addition.

0

There are 0 answers