libc++ patch for max_align_t

Marshall Clow mclow.lists at gmail.com
Sun Feb 9 09:03:50 PST 2014


On the CFE-dev list, Kal reported:

> Running libc++ 3.4 rc1 "testit" on 32-bit Linux fails for test:
> 
> test/language.support/support.types/max_align_t.pass.cpp
> 
> max_align_t is typedef'd to "long double" type in <cstddef>. But...
> 
> alignment_of(long double)=4, sizeof(long double)=12
> alignment_of(long long)=8, sizeof(long long)=8

and last night, in r201037, David Majnemer added support for a macro __ALIGNOF_MAX_ALIGN_T__.

This patch changes the definition of max_align_t when that macro is present.

Note: The actual definition of max_align_t is:
• The type max_align_t is a POD type whose alignment requirement is at least as great as that of every scalar type, and whose alignment requirement is supported in every context.

— Marshall



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140209/99594139/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: max_align.patch
Type: application/octet-stream
Size: 810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140209/99594139/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140209/99594139/attachment-0001.html>


More information about the cfe-commits mailing list