Bug 15973 – nextPow2 and truncPow2 rely on processor specific behavior
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-29T20:06:00Z
Last change time
2016-05-02T16:26:19Z
Assigned to
jack
Creator
jack
Comments
Comment #0 by jack — 2016-04-29T20:06:43Z
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
Comment #1 by github-bugzilla — 2016-05-02T16:26:19Z