4 ms·
> When comparing a signed and an unsigned value, the compiler helpfully promotes the signed (-1) to unsigned. So what do you think the compiler should do? Con
by ori_b 17y ago
> When comparing a signed and an unsigned value, the compiler helpfully promotes the signed (-1) to unsigned.
So what do you think the compiler should do? Convert the unsigned into a signed? Disallow comparison/assignment/addition/... without an explicit cast?