[cfe-dev] c++11's alignas() ignored inside #pragma pack

jahanian fjahanian at apple.com
Tue Jul 22 11:04:34 PDT 2014


This test shows that alignas() is ignored when used with #pragma.
Is this intentional behavior?

#pragma pack(push, 1)
struct S1 { char a; short b; double c; alignas(32) double d; char e; double f; };
#pragma pack(pop)

int main()
{
 return sizeof(struct S1);
}

- Thanks, Fariborz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140722/ceba4b78/attachment.html>


More information about the cfe-dev mailing list