From 1debf6e495618b9b034045cfec5c9b05252bad91 Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Fri, 5 Sep 2025 00:33:28 +0800 Subject: [PATCH 1/3] Add "Remarks" headings for warning references in range [C5051, C5999] --- docs/error-messages/compiler-warnings/compiler-warning-c5072.md | 2 ++ .../compiler-warnings/compiler-warning-level-4-c5266.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md index b3216cb81bb..e84ea3e2594 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md @@ -9,6 +9,8 @@ helpviewer_keywords: ["C5072"] > ASAN enabled without debug information emission. Enable debug info for better ASAN error reporting +## Remarks + This warning occurs when you compile with [Address Sanitizer](/cpp/sanitizers/asan) (ASAN) turned on, but you don't also instruct the compiler to emit debug info. ASAN uses debug info to provide better diagnostics. ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md index f4e794516d5..42f983b964f 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md @@ -9,6 +9,8 @@ helpviewer_keywords: ["C5266"] > 'const' qualifier on return type has no effect +## Remarks + The C++ Standard specifies that a top-level const (or volatile) qualification on a function return type is ignored. This warning is off by default.\ From 7f216f25147adb8ec6eb9019e36b3b72345bba1c Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Fri, 5 Sep 2025 00:34:15 +0800 Subject: [PATCH 2/3] Replace term "sample" with "example" for warning references in range [C5051, C5999] --- docs/error-messages/compiler-warnings/c5105.md | 2 +- docs/error-messages/compiler-warnings/c5208.md | 2 +- docs/error-messages/compiler-warnings/c5262.md | 2 +- docs/error-messages/compiler-warnings/c5301-c5302.md | 2 +- .../compiler-warnings/compiler-warning-level-4-c5266.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/error-messages/compiler-warnings/c5105.md b/docs/error-messages/compiler-warnings/c5105.md index e7167acca07..993d9c630a8 100644 --- a/docs/error-messages/compiler-warnings/c5105.md +++ b/docs/error-messages/compiler-warnings/c5105.md @@ -29,7 +29,7 @@ To turn off the warning for an entire project in the Visual Studio IDE: ## Example -This sample program shows how to generate warning C5105, and how to fix it. +This example program shows how to generate warning C5105, and how to fix it. ```cpp // C5105.cpp diff --git a/docs/error-messages/compiler-warnings/c5208.md b/docs/error-messages/compiler-warnings/c5208.md index 53a7f3b9eaf..12c5afd325d 100644 --- a/docs/error-messages/compiler-warnings/c5208.md +++ b/docs/error-messages/compiler-warnings/c5208.md @@ -33,7 +33,7 @@ To turn off the warning for an entire project in the Visual Studio IDE: ## Example -The following sample shows the constructs that are no longer allowed in unnamed structs. Depending on the standards mode specified, C5208 or C7626 errors or warnings are emitted: +The following example shows the constructs that are no longer allowed in unnamed structs. Depending on the standards mode specified, C5208 or C7626 errors or warnings are emitted: ```cpp struct Base { }; diff --git a/docs/error-messages/compiler-warnings/c5262.md b/docs/error-messages/compiler-warnings/c5262.md index d51098ead1a..1853e272269 100644 --- a/docs/error-messages/compiler-warnings/c5262.md +++ b/docs/error-messages/compiler-warnings/c5262.md @@ -17,7 +17,7 @@ Compiler warning C5262 is new in Visual Studio 2022 version 17.4, and is both of ## Example -The sample code shows diagnostics for `switch` cases that fall through without `break` or `return` statements or the `[[fallthrough]]` attribute. +The example code shows diagnostics for `switch` cases that fall through without `break` or `return` statements or the `[[fallthrough]]` attribute. ```cpp // C5262.cpp diff --git a/docs/error-messages/compiler-warnings/c5301-c5302.md b/docs/error-messages/compiler-warnings/c5301-c5302.md index 0283c7f2f6d..8066c2b6a52 100644 --- a/docs/error-messages/compiler-warnings/c5301-c5302.md +++ b/docs/error-messages/compiler-warnings/c5301-c5302.md @@ -19,7 +19,7 @@ These compiler warnings are new in Visual Studio 2022 version 17.4. ## Example -The sample code shows a diagnostic for a `for` loop that decrements the index, but it uses a `<=` comparison that tests whether the index is less than a value higher than the starting value. +The example code shows a diagnostic for a `for` loop that decrements the index, but it uses a `<=` comparison that tests whether the index is less than a value higher than the starting value. ```C // C5302.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md index 42f983b964f..443fef47659 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md @@ -18,7 +18,7 @@ This warning was introduced in Visual Studio 17.6 ## Example -The following sample generates C5266: +The following example generates C5266: ```cpp // compile with: /W4 /c From d452bb802128de106225e7fad128fbedce826a0c Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Fri, 5 Sep 2025 00:36:13 +0800 Subject: [PATCH 3/3] Update metadata for warning references in range [C5051, C5999] --- docs/error-messages/compiler-warnings/c5054.md | 2 +- docs/error-messages/compiler-warnings/c5055.md | 2 +- docs/error-messages/compiler-warnings/c5056.md | 2 +- docs/error-messages/compiler-warnings/c5105.md | 4 ++-- docs/error-messages/compiler-warnings/c5208.md | 2 +- docs/error-messages/compiler-warnings/c5240.md | 2 +- docs/error-messages/compiler-warnings/c5243.md | 4 ++-- docs/error-messages/compiler-warnings/c5247.md | 2 +- docs/error-messages/compiler-warnings/c5248.md | 2 +- docs/error-messages/compiler-warnings/c5262.md | 2 +- docs/error-messages/compiler-warnings/c5267.md | 2 +- docs/error-messages/compiler-warnings/c5301-c5302.md | 2 +- .../compiler-warnings/compiler-warning-c5072.md | 2 +- .../compiler-warnings/compiler-warning-level-4-c5266.md | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/error-messages/compiler-warnings/c5054.md b/docs/error-messages/compiler-warnings/c5054.md index ba2e219746f..669dbdd5b40 100644 --- a/docs/error-messages/compiler-warnings/c5054.md +++ b/docs/error-messages/compiler-warnings/c5054.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5054" -description: Compiler warning C5054 description and solution. +description: "Compiler warning C5054 description and solution." ms.date: 02/22/2022 f1_keywords: ["C5054"] helpviewer_keywords: ["C5054"] diff --git a/docs/error-messages/compiler-warnings/c5055.md b/docs/error-messages/compiler-warnings/c5055.md index 4cca582e6c3..4a469b06fd3 100644 --- a/docs/error-messages/compiler-warnings/c5055.md +++ b/docs/error-messages/compiler-warnings/c5055.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5055" -description: Compiler warning C5055 description and solution. +description: "Compiler warning C5055 description and solution." ms.date: 02/22/2022 f1_keywords: ["C5055"] helpviewer_keywords: ["C5055"] diff --git a/docs/error-messages/compiler-warnings/c5056.md b/docs/error-messages/compiler-warnings/c5056.md index cb757f7ad98..8d775f210eb 100644 --- a/docs/error-messages/compiler-warnings/c5056.md +++ b/docs/error-messages/compiler-warnings/c5056.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5056" -description: Compiler warning C5056 description and solution. +description: "Compiler warning C5056 description and solution." ms.date: 02/22/2022 f1_keywords: ["C5056"] helpviewer_keywords: ["C5056"] diff --git a/docs/error-messages/compiler-warnings/c5105.md b/docs/error-messages/compiler-warnings/c5105.md index 993d9c630a8..e1f17302e9a 100644 --- a/docs/error-messages/compiler-warnings/c5105.md +++ b/docs/error-messages/compiler-warnings/c5105.md @@ -1,7 +1,7 @@ --- title: "Compiler Warning C5105" -description: Compiler warning C5105 description and solution. -ms.date: "09/22/2019" +description: "Compiler warning C5105 description and solution." +ms.date: 09/22/2019 f1_keywords: ["C5105"] helpviewer_keywords: ["C5105"] --- diff --git a/docs/error-messages/compiler-warnings/c5208.md b/docs/error-messages/compiler-warnings/c5208.md index 12c5afd325d..a1369dcd380 100644 --- a/docs/error-messages/compiler-warnings/c5208.md +++ b/docs/error-messages/compiler-warnings/c5208.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5208, Error C7626" -description: Compiler warning C5208 and error C7626 description and solution. +description: "Compiler warning C5208 and error C7626 description and solution." ms.date: 04/18/2021 f1_keywords: ["C5208", "C7626"] helpviewer_keywords: ["C5208", "C7626"] diff --git a/docs/error-messages/compiler-warnings/c5240.md b/docs/error-messages/compiler-warnings/c5240.md index 8389182d68d..942056d2bcd 100644 --- a/docs/error-messages/compiler-warnings/c5240.md +++ b/docs/error-messages/compiler-warnings/c5240.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5240" -description: Compiler warning C5240 description and solution. +description: "Compiler warning C5240 description and solution." ms.date: 02/22/2022 f1_keywords: ["C5240"] helpviewer_keywords: ["C5240"] diff --git a/docs/error-messages/compiler-warnings/c5243.md b/docs/error-messages/compiler-warnings/c5243.md index 0679327d677..3a14cbf8fee 100644 --- a/docs/error-messages/compiler-warnings/c5243.md +++ b/docs/error-messages/compiler-warnings/c5243.md @@ -1,6 +1,6 @@ --- -title: Compiler warning C5243 -description: Compiler warning C5243 description and solution. +title: "Compiler warning C5243" +description: "Compiler warning C5243 description and solution." ms.date: 08/09/2021 f1_keywords: ["C5243"] helpviewer_keywords: ["C5243"] diff --git a/docs/error-messages/compiler-warnings/c5247.md b/docs/error-messages/compiler-warnings/c5247.md index 6ac55f629e1..f3d1101d2c1 100644 --- a/docs/error-messages/compiler-warnings/c5247.md +++ b/docs/error-messages/compiler-warnings/c5247.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5247" -description: Compiler warning C5247 description and solution. +description: "Compiler warning C5247 description and solution." ms.date: 08/02/2021 f1_keywords: ["C5247"] helpviewer_keywords: ["C5247"] diff --git a/docs/error-messages/compiler-warnings/c5248.md b/docs/error-messages/compiler-warnings/c5248.md index 255771462ec..ea45b79264c 100644 --- a/docs/error-messages/compiler-warnings/c5248.md +++ b/docs/error-messages/compiler-warnings/c5248.md @@ -1,6 +1,6 @@ --- title: "Compiler Warning C5248" -description: Compiler warning C5248 description and solution. +description: "Compiler warning C5248 description and solution." ms.date: 08/02/2021 f1_keywords: ["C5248"] helpviewer_keywords: ["C5248"] diff --git a/docs/error-messages/compiler-warnings/c5262.md b/docs/error-messages/compiler-warnings/c5262.md index 1853e272269..48fcd340ecc 100644 --- a/docs/error-messages/compiler-warnings/c5262.md +++ b/docs/error-messages/compiler-warnings/c5262.md @@ -1,6 +1,6 @@ --- title: "Compiler warning (level 1, error, off) C5262" -description: Compiler warning C5262 description and solution. +description: "Compiler warning C5262 description and solution." ms.date: 03/01/2023 f1_keywords: ["C5262"] helpviewer_keywords: ["C5262"] diff --git a/docs/error-messages/compiler-warnings/c5267.md b/docs/error-messages/compiler-warnings/c5267.md index 23b1a7a5db6..a43a8ec9824 100644 --- a/docs/error-messages/compiler-warnings/c5267.md +++ b/docs/error-messages/compiler-warnings/c5267.md @@ -1,6 +1,6 @@ --- title: "Compiler warning C5267" -description: Learn about compiler warning C5267 +description: "Learn about compiler warning C5267" ms.date: 11/08/2023 f1_keywords: ["C5267"] helpviewer_keywords: ["C5267"] diff --git a/docs/error-messages/compiler-warnings/c5301-c5302.md b/docs/error-messages/compiler-warnings/c5301-c5302.md index 8066c2b6a52..4bc84869d81 100644 --- a/docs/error-messages/compiler-warnings/c5301-c5302.md +++ b/docs/error-messages/compiler-warnings/c5301-c5302.md @@ -1,6 +1,6 @@ --- title: "Compiler warnings (level 1) C5301 and C5302" -description: Compiler warnings C5301 and C5302 description and solution. +description: "Compiler warnings C5301 and C5302 description and solution." ms.date: 03/01/2023 f1_keywords: ["C5301", "C5302"] helpviewer_keywords: ["C5301", "C5302"] diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md index e84ea3e2594..481bbadd2a5 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c5072.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c5072.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Compiler Warning (level 1) C5072" title: "Compiler Warning (level 1) C5072" +description: "Learn more about: Compiler Warning (level 1) C5072" ms.date: 02/09/2024 f1_keywords: ["C5072"] helpviewer_keywords: ["C5072"] diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md index 443fef47659..840a8a254bb 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c5266.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Compiler Warning (level 4) C5266" title: "Compiler Warning (level 4) C5266" +description: "Learn more about: Compiler Warning (level 4) C5266" ms.date: 01/18/2024 f1_keywords: ["C5266"] helpviewer_keywords: ["C5266"]