Earlier quoted context omitted.
Making time an unsigned 32 would break any code that computes a difference of times.
Not really. Addition and subtraction don't care about unsigned vs signed status, because overflow is identitcal in both cases. Think of an odometer for a car with 999999 as its max number. 999,999 is equivalent to -1. So 500 + 999999 == 499 on the odometer. A 32-bit register is simply a binary odometer, so the above concept happens with bits. In "signed int", we print the number "999999" as "-1". With "unsigned int",…
Except signed overflow invoking Undefined Behaviour in any C compiler, whereas unsigned overflow does not.
This invokes undefined behaviour:
foo(int x) {
return x + 1 > x;
}