[llvm-bugs] [Bug 25707] [GCC compatibility] different layout for ms_struct with bit-field

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 2 07:45:59 PST 2015


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

David Majnemer <david.majnemer at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |david.majnemer at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #1 from David Majnemer <david.majnemer at gmail.com> ---
Our ms_struct support is designed to make us compatible with MSVC's bitfield
algorithm, not with GCC implementation of ms_struct.

Running your example with MSVC 2015 Update 1 (19.00.23427.0) gives:

sizeof(struct B) = 12

offsetof(struct B, BField) = 8

__alignof(struct B) = 4

-- 
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/20151202/5b0c2a99/attachment.html>


More information about the llvm-bugs mailing list