@toc: When unsigned types were added to the language, it would IMHO have been best to simply forbid certain operations from being performed between them. Existing code wouldn't be using unsigned types, and having the compiler squawk if code that's changed to use unsigned types has unmatched comparisons would have let programmers examine each such case and determine what cast would be required to yield
the semantics that the program actually needs. As it is, though, some code relies upon the weird corner cases mandated by the Standard, making it impossible to change. —
supercat 14 secs ago