[Issue 4887] New: Right-shifting by 32 is allowed and broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 18 03:15:53 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4887
Summary: Right-shifting by 32 is allowed and broken
Product: D
Version: 1.057
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir <thecybershadow at gmail.com> 2010-09-18 03:15:15 PDT ---
const int x = 12345;
static assert(x>>32 == 0); // fails
It looks like x>>32==x when x is a 32-bit or smaller integer.
Same problem at runtime.
I guess that right-shifting by 32 should be forbidden.
--
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