C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Packing Structure Members (/Zp)
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Syntax:  /Zp[number]
 
     This option sets the packing of data in structures and unions of a
     module to the same boundary. The <number> field represents 1-, 2-,
     or 4-byte boundaries where each structure member is stored after
     the first one. If you use /Zp without an argument, structure
     members are packed on 1-byte boundaries──that is, they are stored
     contiguously. No space is allowed between /Zp and <number>.
 
     On some processors, /Zp can cause slower program execution. Some
     time is required to unpack structure members when accessed. On an
     8086 processor, for example, this option can reduce efficiency if
     members with int or long type fall on odd-byte boundaries.
 
     Use the pack pragma when you want to specify packing other than
     the packing specified on the command line for particular
     structures.
 
     See: pack pragma
                                    -♦-