[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:17:47 PST 2012


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



--- Comment #8 from bearophile_hugs at eml.cc 2012-11-29 18:17:45 PST ---
(In reply to comment #7)

> I want to see how Walter reacts to the pull before these are handled.

Right, OK.

This new error message of yours hits code like this in std.bitmanip:

            enum result = "@property @safe "~T.stringof~" "~name~"() pure
nothrow const { auto result = "
                "("~store~" & "
                ~ myToString(maskAllElse) ~ ") >>"
                ~ myToString(offset) ~ ";"
                ~ (T.min < 0
                   ? "if (result >= " ~ myToString(signBitCheck)
                   ~ ") result |= " ~ myToString(extendSign) ~ ";"
                   : "")
                ~ " return cast("~T.stringof~") result;}\n"


Unless D grows a "static ternary operator" (that is usable in this case) it's
not easy to solve such situations.

-- 
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