http://d.puremagic.com/issues/show_bug.cgi?id=10129
Steven Schveighoffer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution| |INVALID --- Comment #2 from Steven Schveighoffer <[email protected]> 2013-05-21 12:42:53 PDT --- The CPU does math at an integer level. So what happens is, short, ushort, byte, and ubyte are integer promoted to int, then the operation is performed. After the operation, the number may or may not fit into the short, ushort, byte, or ubyte. So the compiler requires a cast so you can verify "yes, I know I'm throwing away data." This is working as expected. (In reply to comment #1) > I am compiling this program, and I don't see errors or warnings: Right, the report states you have to change Num to byte, ubyte, short, or ushort. Probably the attachment should be one of those. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
