Consider __declspec(align(2)) struct X { int a; }; #pragma pack(1) struct Y { struct X x; }; int f(void) { return _Alignof(struct Y); } msvc returns 2, clang returns 4 on the x86_64-pc-windows-msvc target. Presumably because of [1]. If a struct has _any_ alignment attribute, the branch is taken and the overall alignment of the struct is considered required. I do not know the actual behavior of msvc, but I figure that the fix is to exclude RecordType fields from this branch because their required alignment is already handled in [2]. This bug seems to have been introduced in [3]. [1] https://github.com/llvm-mirror/clang/blob/aa231e4be75ac4759c236b755c57876f76e3cf05/lib/AST/RecordLayoutBuilder.cpp#L2447-L2449 [2] https://github.com/llvm-mirror/clang/blob/aa231e4be75ac4759c236b755c57876f76e3cf05/lib/AST/RecordLayoutBuilder.cpp#L2456-L2462 [3] https://reviews.llvm.org/D4714