[Issue 5995] string append negative integer causes segfault

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 16 11:23:08 PDT 2011


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



--- Comment #7 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-05-16 11:19:03 PDT ---
dchar is unsigned. int is signed. They don't cover the same range of values.
Converting from one to the other in either direction is a narrowing conversion.
I expect that the only reason that uint i = -1; compiles is to make it easy to
create the unsigned value whose equivalent is -1 or some other reason related
to C code. But personally, I don't think that it should compile without a cast,
because you cannot represent -1 in a uint.

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