[llvm-bugs] [Bug 32915] issue with unsigned long operations. (hweight64)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 4 01:18:16 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32915

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
u ## x mask = ((u ## x)-1) / ((1 << k) + 1);

This computes 1 << 32 when x is 64 and k is 32, resulting in undefined
behaviour.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170504/fb2eeda7/attachment-0001.html>


More information about the llvm-bugs mailing list