[Issue 6949] New: no warning or error if unsigned variable is compared to 0
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 14 18:16:34 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6949
Summary: no warning or error if unsigned variable is compared
to 0
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-11-14 18:15:49 PST ---
void main()
{
uint i = 0;
if (i < 0)
assert(0, "never");
}
I think such a case means that something went subtly wrong and the variable's
type was intended to be signed, so there should be an error or warning.
--
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