Are most compilers able to check if an addition operation that was performed earlier in the code resulted in a carry?
For example:
unsigned int n = 0xFFFFFFFF; // 8 F's
// doing some stuff here ...
n = n + 1;
// doing some stuff here, without changing the value of @var n
if (n > UINT_MAX) {
// n has a carry
}