digitalmars.D.bugs - signed / unsigned comparisons
- h3r3tic (11/11) Mar 17 2005 import std.stdio;
- Thomas Kuehne (11/22) Mar 17 2005 -----BEGIN PGP SIGNED MESSAGE-----
import std.stdio; void main() { uint a = 100; int b = -1; if (a < b) writefln("a < b"); else writefln("a >= b"); } Prints "a < b". Should it really compile without any warnings / errors ? DMD.118; WinXP
Mar 17 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 h3r3tic schrieb am Thu, 17 Mar 2005 19:46:28 +0100:import std.stdio; void main() { uint a = 100; int b = -1; if (a < b) writefln("a < b"); else writefln("a >= b"); } Prints "a < b". Should it really compile without any warnings / errors ? DMD.118; WinXPYour code is legal D. Issuing a warning would be nice. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCOmUL3w+/yD4P9tIRAraqAJsFI4NIraNG1RQWGkMZ72edUFnIHACfbXVQ OetU6JvjGOJmnsG3uP4vLXw= =vyaD -----END PGP SIGNATURE-----
Mar 17 2005