Data structure alignment: Difference between revisions

Content deleted Content added
Line 74:
Requesting that the ''MixedData'' structure above be aligned to a one byte boundary will have the compiler discard the pre-determined alignment of the members and no padding bytes would be inserted.
 
While there is no standard way of defining the alignment of structure membermembers, some compilers use ''#pragma'' directives to specify packing inside source files. Here is an example:
 
#pragma pack(push) /* push current alignment to stack */