cpp-docs icon indicating copy to clipboard operation
cpp-docs copied to clipboard

Add information on new C4862 warning

Open Rageking8 opened this issue 4 months ago • 3 comments

Add information on new C4862 warning (level 1) introduced in Visual Studio 2022 version 17.14 (https://devblogs.microsoft.com/cppblog/updates-to-warning-suppressions-in-microsoft-c-code-analysis/#what’s-new-in-#pragma-warning).

Example

Simple example that emits C4862 with VS 17.14 and later:

// C4862.cpp
// compile with: /c /W1

#pragma warning(disable : 4800 4810, justification : "reason")   // C4862

Rageking8 avatar Aug 02 '25 10:08 Rageking8