cpp-docs
cpp-docs copied to clipboard
Add information on new C4862 warning
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