From 8d8aa5a4e6e47a726a3154a1c76c4585fba514d9 Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Wed, 10 Sep 2025 17:13:49 +0800 Subject: [PATCH 1/2] Tweak C5072 "Example" section --- .../compiler-warnings/compiler-warning-c5072.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md index 0ae2c93e6f..a58a4df49f 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md @@ -15,13 +15,17 @@ This warning occurs when you compile with [Address Sanitizer](../../sanitizers/a ## Example -The following command line generates warning `C5072`: +The following command line generates warning C5072: -```cpp - cl /fsanitize=address /EHsc test.cpp +```cmd +cl /fsanitize=address /EHsc test.cpp ``` -To fix it, have the compiler generate debug information by using a switch like [`/Zi`](../../build/reference/z7-zi-zi-debug-information-format.md#zi) or [`/Z7`](../../build/reference/z7-zi-zi-debug-information-format.md#z7), like this: `cl /fsanitize=address /EHsc /Zi test.cpp` +To fix it, have the compiler generate debug information by using a switch like [`/Zi`](../../build/reference/z7-zi-zi-debug-information-format.md#zi) or [`/Z7`](../../build/reference/z7-zi-zi-debug-information-format.md#z7), like this: + +```cmd +cl /fsanitize=address /EHsc /Zi test.cpp +``` ## See also From ac5ba4887004cba6311788cfe6f56c5ec1e73c2d Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Wed, 10 Sep 2025 17:15:43 +0800 Subject: [PATCH 2/2] Update `ms.date` metadata in C5072 warning reference --- docs/error-messages/compiler-warnings/compiler-warning-c5072.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md index a58a4df49f..ad186122f6 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md @@ -1,7 +1,7 @@ --- title: "Compiler Warning (level 1) C5072" description: "Learn more about: Compiler Warning (level 1) C5072" -ms.date: 02/09/2024 +ms.date: 09/10/2025 f1_keywords: ["C5072"] helpviewer_keywords: ["C5072"] ---