Skip to content

Commit 77fb3bb

Browse files
authored
Merge pull request #3335 from TylerMSFT/twhitney-preproc
update references to the old experimental preprocessor switch
2 parents 49d22bc + a4eaf3f commit 77fb3bb

5 files changed

+9
-8
lines changed

docs/build/reference/compiler-options-listed-alphabetically.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
3333
| [`/errorReport`](errorreport-report-internal-compiler-errors.md) | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
3434
| [`/execution-charset`](execution-charset-set-execution-character-set.md) | Set the execution character set. |
3535
| [`/experimental:module`](experimental-module.md) | Enables experimental module support. |
36-
| [`/experimental:preprocessor`](experimental-preprocessor.md) | Enables experimental conforming preprocessor support. |
36+
| [`/experimental:preprocessor`](experimental-preprocessor.md) | Deprecated. Enables experimental conforming preprocessor support. Use [`/Zc:preprocessor`](zc-preprocessor.md) |
3737
| [`/F`](f-set-stack-size.md) | Sets stack size. |
3838
| [`/favor`](favor-optimize-for-architecture-specifics.md) | Produces code optimized for a specific x64 architecture. Or, for the specific micro-architectures in both the AMD64 and EM64T architectures. |
3939
| [`/FA`](fa-fa-listing-file.md) | Creates a listing file. |

docs/build/reference/compiler-options-listed-by-category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Experimental options may only be supported by certain versions of the compiler.
202202
| Option | Purpose |
203203
|--|--|
204204
| [`/experimental:module`](experimental-module.md) | Enables experimental module support. |
205-
| [`/experimental:preprocessor`](experimental-preprocessor.md) | Enables experimental conforming preprocessor support. |
205+
| [`/experimental:preprocessor`](experimental-preprocessor.md) | Deprecated. Enables experimental conforming preprocessor support. Use [`/Zc:preprocessor`](zc-preprocessor.md) |
206206

207207
## Deprecated and removed compiler options
208208

docs/build/reference/compiler-options.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
description: "Learn more about: Compiler Options"
33
title: "MSVC Compiler Options"
4-
ms.date: "05/06/2019"
4+
ms.date: "12/14/2020"
55
helpviewer_keywords: ["cl.exe compiler", "x86 MSVC compiler", "ARM MSVC compiler", "compiler options, C++", "x64 MSVC compiler"]
6-
ms.assetid: ed3376c8-bef4-4c9a-80e9-3b5da232644c
76
---
87
# Compiler Options
98

@@ -14,7 +13,7 @@ cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers and
1413
1514
The compilers produce Common Object File Format (COFF) object (.obj) files. The linker produces executable (.exe) files or dynamic-link libraries (DLLs).
1615

17-
Note that all compiler options are case sensitive. You may use either a forward slash (`/`) or a dash (`-`) to specify a compiler option.
16+
All compiler options are case-sensitive. You may use either a forward slash (`/`) or a dash (`-`) to specify a compiler option.
1817

1918
To compile without linking, use the [/c](c-compile-without-linking.md) option.
2019

docs/preprocessor/predefined-macros.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Predefined macros"
33
description: "Lists and describes the Microsoft C++ compiler predefined preprocessor macros."
44
ms.custom: "update_every_version"
5-
ms.date: 09/11/2020
5+
ms.date: 12/14/2020
66
f1_keywords: ["_ATL_VER", "__ATOM__", "__AVX__", "__AVX2__", "__AVX512BW__", "__AVX512CD__", "__AVX512DQ__", "__AVX512F__", "__AVX512VL__", "_CHAR_UNSIGNED", "__CLR_VER", "_CONTROL_FLOW_GUARD", "__COUNTER__", "__cplusplus", "__cplusplus_cli", "__cplusplus_winrt", "_CPPRTTI", "_CPPUNWIND", "__DATE__", "_DEBUG", "_DLL", "__FILE__", "__FUNCDNAME__", "__FUNCSIG__", "__FUNCTION__", "_INTEGRAL_MAX_BITS", "_ISO_VOLATILE", "_KERNEL_MODE", "__LINE__", "_M_AMD64", "_M_ARM", "_M_ARM_ARMV7VE", "_M_ARM_FP", "_M_ARM64", "_M_CEE", "_M_CEE_PURE", "_M_CEE_SAFE", "_M_FP_EXCEPT", "_M_FP_FAST", "_M_FP_PRECISE", "_M_FP_STRICT", "_M_IX86", "_M_IX86_FP", "_M_X64", "_MANAGED", "_MFC_VER", "_MSC_BUILD", "_MSC_EXTENSIONS", "_MSC_FULL_VER", "_MSC_VER", "_MSVC_LANG", "__MSVC_RUNTIME_CHECKS", "_MT", "_NATIVE_WCHAR_T_DEFINED", "_NO_SIZED_DEALLOCATION", "_OPENMP", "_PREFAST_", "_RESUMABLE_FUNCTIONS_SUPPORTED", "_RTC_CONVERSION_CHECKS_ENABLED", "__STDC__", "__STDC_HOSTED__", "__STDC_NO_ATOMICS__", "__STDC_NO_COMPLEX__", "__STDC_NO_THREADS__", "__STDC_NO_VLA__", "__STDC_VERSION__", "__STDCPP_THREADS__", "__TIME__", "__TIMESTAMP__", "__VA_ARGS__", "_VC_NODEFAULTLIB", "_WCHAR_T_DEFINED", "_WIN32", "_WIN64", "_WINRT_DLL"]
77
helpviewer_keywords: ["timestamps, preprocessor macro", "cl.exe compiler, version number", "version numbers, C/C++ compiler (cl.exe)", "macros, predefined C++", "preprocessor, macros", "predefined macros", "_ATL_VER macro", "__ATOM__ macro", "__AVX__ macro", "__AVX2__ macro", "__AVX512BW__ macro", "__AVX512CD__ macro", "__AVX512DQ__ macro", "__AVX512F__ macro", "__AVX512VL__ macro", "_CHAR_UNSIGNED macro", "__CLR_VER macro", "_CONTROL_FLOW_GUARD macro", "__COUNTER__ macro", "__cplusplus macro", "__cplusplus_cli macro", "__cplusplus_winrt macro", "_CPPRTTI macro", "_CPPUNWIND macro", "__DATE__ macro", "_DEBUG macro", "_DLL macro", "__FILE__ macro", "__FUNCDNAME__ macro", "__FUNCSIG__ macro", "__FUNCTION__ macro", "_INTEGRAL_MAX_BITS macro", "_ISO_VOLATILE macro", "_KERNEL_MODE macro", "__LINE__ macro", "_M_AMD64 macro", "_M_ARM macro", "_M_ARM_ARMV7VE macro", "_M_ARM_FP macro", "_M_ARM64 macro", "_M_CEE macro", "_M_CEE_PURE macro", "_M_CEE_SAFE macro", "_M_FP_EXCEPT macro", "_M_FP_FAST macro", "_M_FP_PRECISE macro", "_M_FP_STRICT macro", "_M_IX86 macro", "_M_IX86_FP macro", "_M_X64 macro", "_MANAGED macro", "_MFC_VER macro", "_MSC_BUILD macro", "_MSC_EXTENSIONS macro", "_MSC_FULL_VER macro", "_MSC_VER macro", "_MSVC_LANG macro", "__MSVC_RUNTIME_CHECKS macro", "_MT macro", "_NATIVE_WCHAR_T_DEFINED macro", "_NO_SIZED_DEALLOCATION macro", "_OPENMP macro", "_PREFAST_ macro", "_RESUMABLE_FUNCTIONS_SUPPORTED macro", "_RTC_CONVERSION_CHECKS_ENABLED macro", "__STDC__ macro", "__STDC_HOSTED__ macro", "__STDC_NO_ATOMICS__ macro", "__STDC_NO_COMPLEX__ macro", "__STDC_NO_THREADS__ macro", "__STDC_NO_VLA__ macro", "__STDC_VERSION__ macro", "__STDCPP_THREADS__ macro", "__TIME__ macro", "__TIMESTAMP__ macro", "__VA_ARGS__ macro", "_VC_NODEFAULTLIB macro", "_WCHAR_T_DEFINED macro", "_WIN32 macro", "_WIN64 macro", "_WINRT_DLL macro", "__func__ identifier"]
88
ms.assetid: 1cc5f70a-a225-469c-aed0-fe766238e23f
@@ -286,7 +286,9 @@ MSVC supports these additional predefined macros.
286286

287287
- `__MSVC_RUNTIME_CHECKS` Defined as 1 when one of the [`/RTC`](../build/reference/rtc-run-time-error-checks.md) compiler options is set. Otherwise, undefined.
288288

289-
- `_MSVC_TRADITIONAL` Defined as 0 when the preprocessor conformance mode [`/experimental:preprocessor`](../build/reference/experimental-preprocessor.md) compiler option is set. Defined as 1 by default, or when the [`/experimental:preprocessor-`](../build/reference/experimental-preprocessor.md) compiler option is set, to indicate the traditional preprocessor is in use. The `_MSVC_TRADITIONAL` macro and [**`/experimental:preprocessor`** (Enable preprocessor conformance mode)](../build/reference/experimental-preprocessor.md) compiler option is available beginning in Visual Studio 2017 version 15.8.
289+
- `_MSVC_TRADITIONAL`:
290+
- Available beginning with Visual Studio 2017 version 15.8: Defined as 0 when the preprocessor conformance mode [`/experimental:preprocessor`](../build/reference/experimental-preprocessor.md) compiler option is set. Defined as 1 by default, or when the [`/experimental:preprocessor-`](../build/reference/experimental-preprocessor.md) compiler option is set, to indicate the traditional preprocessor is in use.
291+
- Available beginning with Visual Studio 2019 version 16.5: Defined as 0 when the preprocessor conformance mode [`/Zc:preprocessor`](../build/reference/zc-preprocessor.md) compiler option is set. Defined as 1 by default, or when the `/Zc:preprocessor-` compiler option is set, to indicate the traditional preprocessor is in use (essentially, `/Zc:preprocessor` replaces the deprecated `/experimental:preprocessor`).
290292

291293
```cpp
292294
#if defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL

docs/preprocessor/variadic-macros.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Variadic macros are function-like macros that contain a variable number of argum
1313

1414
To use variadic macros, the ellipsis may be specified as the final formal argument in a macro definition, and the replacement identifier `__VA_ARGS__` may be used in the definition to insert the extra arguments. `__VA_ARGS__` is replaced by all of the arguments that match the ellipsis, including commas between them.
1515

16-
The C Standard specifies that at least one argument must be passed to the ellipsis, to ensure the macro doesn't resolve to an expression with a trailing comma. The traditional Microsoft C++ implementation suppresses a trailing comma if no arguments are passed to the ellipsis. When the `/experimental:preprocessor` compiler option is set, the trailing comma is not suppressed.
16+
The C Standard specifies that at least one argument must be passed to the ellipsis to ensure the macro doesn't resolve to an expression with a trailing comma. The traditional Microsoft C++ implementation suppresses a trailing comma if no arguments are passed to the ellipsis. When the [`/Zc:preprocessor`](../build/reference/zc-preprocessor.md) compiler option is set, the trailing comma isn't suppressed.
1717

1818
## Example
1919

0 commit comments

Comments
 (0)