[Issue 4887] Right-shifting by 32 is allowed and broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 18 08:53:44 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4887


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |smjg at iname.com


--- Comment #3 from Stewart Gordon <smjg at iname.com> 2010-09-18 08:53:09 PDT ---
http://www.digitalmars.com/d/1.0/expression.html#ShiftExpression
"It's illegal to shift by more bits than the size of the quantity being
shifted:

int c;
c << 33;    // error"

However, there's a real problem with that spec: what if the number of bits to
shift by isn't known at compile time?

-- 
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