[Issue 15973] New: nextPow2 relies on processor specific behavior
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Fri Apr 29 13:06:43 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15973
          Issue ID: 15973
           Summary: nextPow2 relies on processor specific behavior
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: jack at jackstouffer.com
The integer version of nextPow2 uses >> on numbers that cause overflow. The
behavior of this operation is processor specific, so the function should just
return 0 if val == T.max/T.min
--
    
    
More information about the Digitalmars-d-bugs
mailing list