[Issue 259] Comparing signed to unsigned does not generate an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 9 05:21:56 PDT 2013


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



--- Comment #43 from Stewart Gordon <smjg at iname.com> 2013-04-09 05:21:52 PDT ---
(In reply to comment #42)
> Yes, I'll have this done this week.
> For point 1: how to cope with the fact that I can safely cast an uint to long,
> but can't cast an int to an ulong (without issues)? 
> Surely cast(int)-1 < cast(ulong)1 should evaluate to true? But according to
> point 1 it would be rewritten as cast(ulong)-1 < cast(ulong)1 which is
> 0xFFFFFFFFFFFFFFFF < 0x1 and evaluate to false.

No.  Point 1 is the case where a.sizeof > b.sizeof.  This isn't the case here.

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