> If done in unsigned, this won't lead to any optimization, as unsigned > arithmetic doesn't have overflows. So, if you write "a - 10" where a > is unsigned, the compiler can't assume anything, whereas is a is > signed, the compiler can assume that a >= INT_MIN + 10, reducing > the range for a, and possibly allowing some optimizations.
I don't follow. The purpose of this hand-optimization (whch is also done by GCC) is to replace two comparisons with one subtraction and one comparison, which is faster on most machines. It's not CORRECT to do this transformation in signed unless you know there won't be overflow. In general, for modern compilers it's best not to do this transformation AT ALL and let the compiler figure out the best way to do the range tst.