[Issue 6949] no warning or error if unsigned variable is compared to 0

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 29 18:03:21 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6949



--- Comment #6 from bearophile_hugs at eml.cc 2012-11-29 18:03:20 PST ---
How about code like this?

void main() {
    uint i = 0;
    if (i == -2)
        assert(0, "never");
}


Note that this is currently valid D code:

void main() {
    uint i = -2;
    if (i == -2) {}
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list