digitalmars.D.bugs - [Issue 15973] New: nextPow2 relies on processor specific behavior
- via Digitalmars-d-bugs (17/17) Apr 29 2016 https://issues.dlang.org/show_bug.cgi?id=15973
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 puremagic.com Reporter: jack 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 --
Apr 29 2016