D-Programming-Language/dmd — pull request #444 by ckamm (2011-10-10 15:56:35+00:00)
Title: Bug 259: Error on unsafe signed/unsigned comparisons.

Fixes http://d.puremagic.com/issues/show_bug.cgi?id=259 in a way that uses the range propagation of expressions. It is also still backwards compatible with C code, though some C code may now produce an error. It still breaks lots of existing code though.

Examples:

```c
uint a = 3;
if (a > 4) {} // ok

uint b = 3;
if (b > -2) {} // now an error

byte c = -67;
uint u;
if (u < c + 0x100) {} // ok

int[] a;
for (int i = 0; i < a.length; ++i) {} // error, ugh
```