www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14380] New: core.bitop.bsf is marked as pure but isn't

https://issues.dlang.org/show_bug.cgi?id=14380

          Issue ID: 14380
           Summary: core.bitop.bsf is marked as pure but isn't
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

core.bitop.bsf returns an undefined value if its argument is 0. However, it is
marked as pure.

The function should either assert that its input is non-zero, or have its pure
attribute removed.

--
Mar 30 2015