[clang] [Clang][Windows] Preserve x86_fp80 and vector alignment under #pragma pack. (PR #208256)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 16:52:40 PDT 2026


https://github.com/ojhunt requested changes to this pull request.

I think this PR is wrong.

I had assumed that this was a win32 PR because long double is fp64 on win64 so it didn't occur to me to think of this as a win64-ism.

On win32, where long double is fp80, clang respects the win32 ABI's 8 byte alignment of long doubles. There is no re-arrangement/ignorance of packing, the type is 8 byte aligned.

The problem is that your test case is hitting is that it is using an ABI breaking flag.

I asked whether the behavior was correct here: https://github.com/llvm/llvm-project/pull/208256#discussion_r3696552254

but it was resolved without answer.

I can't see any evidence of any per-type alignment overrides in MSVC.

@StephanTLavavej do you have any thoughts on this?

https://github.com/llvm/llvm-project/pull/208256


More information about the cfe-commits mailing list