digitalmars.D.bugs - [Issue 3280] New: comparing array length is wonky
- d-bugmail puremagic.com (24/24) Sep 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3280
- d-bugmail puremagic.com (15/15) Sep 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3280
- Ellery Newcomer (2/4) Sep 01 2009 Oh, gosh. I need multiple votes.
- d-bugmail puremagic.com (11/11) Sep 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3280
http://d.puremagic.com/issues/show_bug.cgi?id=3280 Summary: comparing array length is wonky Product: D Version: 2.031 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: ellery-newcomer utulsa.edu void main(){ string s; int a = s.length; assert(a == 0); assert(s.length == 0); assert(a == 0); assert(a > -1); assert(s.length > -1); //fails } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 01 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3280 Jarrett Billingsley <jarrett.billingsley gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |jarrett.billingsley gmail.c | |om 2009-09-01 17:09:24 PDT --- Sorry, invalid. typeof(s.length) is unsigned, typeof(-1) is signed. The compiler should throw an error on the last assert, but doesn't. Instead, it casts -1 to size_t, resulting in something like "assert(s.length > 0xFFFFFFFF);" See bug 259. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 01 2009
d-bugmail puremagic.com wrote:See bug 259.Oh, gosh. I need multiple votes.
Sep 01 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3280 Jarrett Billingsley <jarrett.billingsley gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID 2009-09-01 17:09:39 PDT --- Oops -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 01 2009