Microsoft KB Archive/64163

= Microsoft Knowledge Base =

Using /Zp Has Defaults Different Than Not Using /Zp
Last reviewed: July 22, 1997

Article ID: Q64163

6.00 6.00a 6.00ax 7.00 | 6.00 6.00a | 1.00 1.50 | 1.00 2.00 4.00

MS-DOS                | OS/2       | WINDOWS   | WINDOWS NT kbtool

The information in this article applies to:

The Microsoft C/C++ Compiler (CL.EXE), included with:

- Microsoft C for MS-DOS, versions 6.0, 6.0a, and 6.0ax - Microsoft C for OS/2, versions 6.0 and 6.0a - Microsoft C/C++ for MS-DOS, versions 7.0 - Microsoft Visual C++ for Windows, versions 1.0 and 1.5 - Microsoft Visual C++ 32-bit Edition, versions 1.0, 2.0, and 4.0

SUMMARY
When specifying the /Zp switch in Microsoft C, it should be observed that the default functionality when using the /Zp switch without a numeric argument is equivalent to /Zp1 (that is, structure members will be packed on 1-byte boundaries).

Additionally, if the /Zp switch is not specified, the structure members will be packed on 2-byte boundaries for 16-bit targets and packed on 8-byte boundaries for 32-bit targets.