[llvm-bugs] [Bug 25852] operation on bit-fields shall yield results reduced to bit-field size

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 16 09:46:45 PST 2015


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

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> ---
No, that's a GCC bug. Bit width is not part of the type, in C or C++, so the
calculation is performed in the full range of an unsigned long long.

The "33 bit integer" type that GCC has comes from them implementing a
pre-standard resolution to a C DR on bitfields. IIRC modern versions of GCC
have removed that nonstandard behavior.

-- 
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/20151216/75e676d8/attachment.html>


More information about the llvm-bugs mailing list