[llvm-bugs] [Bug 51689] Clang introduces invalid padding for empty base classes

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 31 15:50:41 PDT 2021


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

Joachim Meyer <joachim at joameyer.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #3 from Joachim Meyer <joachim at joameyer.de> ---
Closing and leaving this as a reference:
https://devblogs.microsoft.com/cppblog/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/

One can use `__declspec(empty_bases)` to work around the issue right now and a
future major version of MSVC might change the ABI to do that by default
(although there hasn't been a new major version since then).

Still wondering whether it might be possible, to not just silently miscompile
when using the differently layouted as parameters to CUDA kernels.

-- 
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/20210831/379cd241/attachment.html>


More information about the llvm-bugs mailing list