Out of curiosity, could you combine #pragma pack(1) with __declspec(align(4)) to get the structure packing effect, without impacting the alignment of the structure when embedded in other structures?My quick experiments suggest that yes you can add __declspec(align(4)) or alignas(4) to restore 4-byte alignment.But note that this is not guaranteed to be sufficient; I believe some 64-bit architectures require 8-byte alignment?__declspec(align(sizeof(void*))) should work but I have not tried it.Prefer using “struct alignas(void*) Foo”