Search code examples
c++visual-studiovisual-studio-2015warningssuppress-warnings

How to disable Visual Studio warnings for a specific symbol?


Is there a way in Microsoft Visual Studio 2015 Update 3 to disable a warning for a specific C++ symbol?

That is, does Microsoft Visual Studio 2015 Update 3 have a functionality similar to the one of PC-Lint documented here https://www.gimpel.com/html/techfaq.htm#q5 ?


Solution

  • No. The compilers typically do not have flexibility of static analysis tools. Visual studio lets to turn individual warnings on and off from command line per file or from code using pragmas per specific code lines. Docs are at Microsoft site