<i>But if it&#x27;s unsigned this will never be true either...</i><p>Conceptually, it works through promotion. -1 is cast to unsigned&#x2F;size_t before the test, which then succeeds. At the assembly level, a 32-bit -1 is 0xFFFFFFFF, which is also the result of the underflow of i, so it works at that level, too.<p>At any rate, it worked in the compiler I tried it with.