Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.69 KB

zc-preprocessor.md

File metadata and controls

32 lines (20 loc) · 1.69 KB
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
preprocessor
/Zc:preprocessor
preprocessor conformance
/Zc:preprocessor
Enable preprocessor conformance mode

/Zc:preprocessor (Enable preprocessor conformance mode)

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.

Syntax

/Zc:preprocessor[-]

Remarks

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.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Command Line property page.

  3. Modify the Additional Options property to include /Zc:preprocessor and then choose OK.

See also

/Zc (Conformance)