Skip to content

Commit 1858ca3

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2698 from MicrosoftDocs/master637459866866166855
Repo sync for protected CLA branch
2 parents 3c41d14 + 14d6ae0 commit 1858ca3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/build/reference/zp-struct-member-alignment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: /Zp (Struct Member Alignment)"
33
title: "/Zp (Struct Member Alignment)"
4-
ms.date: "04/04/2019"
4+
ms.date: "01/08/2021"
55
f1_keywords: ["/zp", "VC.Project.VCCLCompilerTool.StructMemberAlignment", "VC.Project.VCCLWCECompilerTool.StructMemberAlignment"]
66
helpviewer_keywords: ["Struct Member Alignment compiler option", "Zp compiler option", "/Zp compiler option [C++]", "-Zp compiler option [C++]"]
77
ms.assetid: 5242f656-ed9b-48a3-bc73-cfcf3ed2520f
@@ -31,9 +31,9 @@ The available packing values are described in the following table:
3131
Don't use this option unless you have specific alignment requirements.
3232

3333
> [!WARNING]
34-
> C++ headers in the Windows SDK set and assume **`/Zp8`** packing internally. Memory corruption may occur if the **`/Zp`** setting is changed inside the Windows SDK headers. The headers aren't affected by any **`/Zp`** option you set on the command line.
34+
> The C/C++ headers in the Windows SDK assume **`/Zp8`** packing internally. Don't change the setting from the default when you include the Windows SDK headers, either by using **`/Zp`** on the command line or by using `#pragma pack`. Otherwise, your application may cause memory corruption at runtime.
3535
36-
You can also use [`pack`](../../preprocessor/pack.md) to control structure packing. For more information about alignment, see:
36+
You can also use the [`pack` pragma](../../preprocessor/pack.md) to control structure packing. For more information about alignment, see:
3737

3838
- [`align`](../../cpp/align-cpp.md)
3939

0 commit comments

Comments
 (0)