5.53.7 Structure-Packing Pragmas
For compatibility with Win32, GCC supports a set of
directives which change the maximum alignment of members of structures
(other than zero-width bitfields), unions, and classes subsequently
defined. The n value below always is required to be a small power
of two and specifies the new maximum alignment in bytes.
)pushes the current maximum alignment setting onto an internal stack and then sets the new maximum alignment. (APPLE ONLY)
#pragma pack()acts like a
#pragma pack(pop)directive. (APPLE ONLY)
])pushes the current maximum alignment setting onto an internal stack and then optionally sets the new maximum alignment.
#pragma pack(pop)restores the maximum alignment setting to the one saved at the top of the internal stack (and removes that stack entry).
Some targets, e.g. i386 and powerpc, support the
#pragma which lays out a structure as the documented
#pragma ms_struct onturns on the layout for structures declared.
#pragma ms_struct offturns off the layout for structures declared.
#pragma ms_struct resetgoes back to the default layout.