title | description | ms.date | f1_keywords | helpviewer_keywords | |||||
---|---|---|---|---|---|---|---|---|---|
/Zc:preprocessor (Enable preprocessor conformance mode) |
Use the /Zc:preprocessor compiler option to enable compiler support for a standard conforming preprocessor. |
09/10/2020 |
|
|
This option enables a token-based preprocessor that conforms to C99 and C++11 and later standards. For more information, see MSVC new preprocessor overview.
/Zc:preprocessor
[-]
Use the /Zc:preprocessor
compiler option to enable the conforming preprocessor. You can use /Zc:preprocessor-
option to explicitly specify the traditional (non-conforming) preprocessor.
The /Zc:preprocessor
option is available starting in Visual Studio 2019 version 16.5. An earlier, incomplete version of the new preprocessor option is available in versions of Visual Studio starting in Visual Studio 2017 version 15.8. For more information, see /experimental:preprocessor
.
-
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Command Line property page.
-
Modify the Additional Options property to include
/Zc:preprocessor
and then choose OK.