[Issue 550] New: Shifting by more bits than size of quantity is allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 18 04:06:31 PST 2006


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

           Summary: Shifting by more bits than size of quantity is allowed
           Product: D
           Version: 0.174
          Platform: PC
               URL: http://www.digitalmars.com/d/expression.html
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com
OtherBugsDependingO 511
             nThis:


The compiler allows the following code, directly from the spec:

int c;
c << 33;        // error

Even though "[i]t's illegal to shift by more bits than the size of the quantity
being shifted". I'm not sure if this is a useful restriction, but either the
spec or DMD is in error.


-- 




More information about the Digitalmars-d-bugs mailing list