You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/preprocessor/predefined-macros.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Visual C++ supports the required predefined preprocessor macros specified by the
22
22
23
23
The compiler supports this predefined identifier specified by ISO C99 and ISO C++11.
24
24
25
-
-**__func__** The unqualified and unadorned name of the enclosing function as a function-local `static const` array of `char`.
25
+
-**__func__** The unqualified and unadorned name of the enclosing function as a function-local **static const** array of **char**.
26
26
27
27
```cpp
28
28
voidexample(){
@@ -60,7 +60,7 @@ Microsoft Visual C++ supports these additional predefined macros.
60
60
61
61
-**__AVX2__** Defined as 1 when the [/arch:AVX2](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined.
62
62
63
-
-**_CHAR_UNSIGNED** Defined as 1 if the default `char` type is unsigned. This is set when the [/J (Default char Type Is unsigned)](../build/reference/j-default-char-type-is-unsigned.md) compiler option is set. Otherwise, undefined.
63
+
-**_CHAR_UNSIGNED** Defined as 1 if the default **char** type is unsigned. This is set when the [/J (Default char Type Is unsigned)](../build/reference/j-default-char-type-is-unsigned.md) compiler option is set. Otherwise, undefined.
64
64
65
65
-**__CLR_VER** Defined as an integer literal that represents the version of the common language runtime used when the application was compiled. The value is encoded in the form `Mmmbbbbb`, where `M` is the major version of the runtime, `mm` is the minor version of the runtime, and `bbbbb` is the build number. **__CLR_VER** is defined if the [/clr](../build/reference/clr-common-language-runtime-compilation.md) compiler option is set. Otherwise, undefined.
66
66
@@ -178,9 +178,9 @@ Microsoft Visual C++ supports these additional predefined macros.
178
178
179
179
- **_M_ARM_FP** Defined as an integer literal value that indicates which [/arch](../build/reference/arch-arm.md) compiler option was set, if the compilation target is an ARM processor. Otherwise, undefined.
180
180
181
-
- In the range 30-39 if no **/arch** ARM option was specified, indicating the default architecture for ARM was set (`VFPv3`).
181
+
- In the range 30-39 if no `/arch` ARM option was specified, indicating the default architecture for ARM was set (`VFPv3`).
182
182
183
-
- In the range 40-49 if **/arch:VFPv4** was set.
183
+
- In the range 40-49 if `/arch:VFPv4` was set.
184
184
185
185
- See [/arch (ARM)](../build/reference/arch-arm.md) for more information.
186
186
@@ -204,11 +204,11 @@ Microsoft Visual C++ supports these additional predefined macros.
204
204
205
205
- **_M_IX86_FP** Defined as an integer literal value that indicates the [/arch](../build/reference/arch-arm.md) compiler option that was set, or the default. This macro is always defined when the compilation target is an x86 processor. Otherwise, undefined. When defined, the value is:
206
206
207
-
- 0 if the **/arch:IA32** compiler option was set.
207
+
- 0 if the `/arch:IA32` compiler option was set.
208
208
209
-
- 1 if the **/arch:SSE** compiler option was set.
209
+
- 1 if the `/arch:SSE` compiler option was set.
210
210
211
-
- 2 if the **/arch:SSE2**, **/arch:AVX** or **/arch:AVX2** compiler option was set. This value is the default if an **/arch** compiler option was not specified. When **/arch:AVX** is specified, the macro **__AVX__** is also defined. When **/arch:AVX2** is specified, both **__AVX__** and **__AVX2__** are also defined.
211
+
- 2 if the `/arch:SSE2`, `/arch:AVX` or `/arch:AVX2` compiler option was set. This value is the default if an `/arch` compiler option was not specified. When `/arch:AVX` is specified, the macro **__AVX__** is also defined. When `/arch:AVX2` is specified, both **__AVX__** and **__AVX2__** are also defined.
212
212
213
213
- See [/arch (x86)](../build/reference/arch-x86.md) for more information.
214
214
@@ -220,9 +220,9 @@ Microsoft Visual C++ supports these additional predefined macros.
220
220
221
221
- **_MSC_EXTENSIONS** Defined as 1 if the [/Ze (Enable Language Extensions)](../build/reference/za-ze-disable-language-extensions.md) compiler option is set, which is the default. Otherwise, undefined.
222
222
223
-
- **_MSC_FULL_VER** Defined as an integer literal that encodes the major, minor, and build number elements of the compiler's version number. The major number is the first element of the period-delimited version number, the minor number is the second element, and the build number is the third element. For example, if the version number of the Visual C++ compiler is 15.00.20706.01, the **_MSC_FULL_VER** macro evaluates to 150020706. Enter **cl /?** at the command line to view the compiler's version number. This macro is always defined.
223
+
- **_MSC_FULL_VER** Defined as an integer literal that encodes the major, minor, and build number elements of the compiler's version number. The major number is the first element of the period-delimited version number, the minor number is the second element, and the build number is the third element. For example, if the version number of the Visual C++ compiler is 15.00.20706.01, the **_MSC_FULL_VER** macro evaluates to 150020706. Enter `cl /?` at the command line to view the compiler's version number. This macro is always defined.
224
224
225
-
- **_MSC_VER** Defined as an integer literal that encodes the major and minor number elements of the compiler's version number. The major number is the first element of the period-delimited version number and the minor number is the second element. For example, if the version number of the Visual C++ compiler is 17.00.51106.1, the **_MSC_VER** macro evaluates to 1700. Enter **cl /?** at the command line to view the compiler's version number. This macro is always defined.
225
+
- **_MSC_VER** Defined as an integer literal that encodes the major and minor number elements of the compiler's version number. The major number is the first element of the period-delimited version number and the minor number is the second element. For example, if the version number of the Visual C++ compiler is 17.00.51106.1, the **_MSC_VER** macro evaluates to 1700. Enter `cl /?` at the command line to view the compiler's version number. This macro is always defined.
226
226
227
227
|Visual Studio version|_MSC_VER|
228
228
|-|-|
@@ -280,7 +280,7 @@ Microsoft Visual C++ supports these additional predefined macros.
280
280
281
281
- **_VC_NODEFAULTLIB** Defined as 1 when the [/Zl (Omit Default Library Name)](../build/reference/zl-omit-default-library-name.md) compiler option is set. Otherwise, undefined.
282
282
283
-
- **_WCHAR_T_DEFINED** Defined as 1 when the default [/Zc:wchar_t](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) compiler option is set. The **_WCHAR_T_DEFINED** macro is defined but has no value if the **/Zc:wchar_t-** compiler option is set, and `wchar_t` is defined in a system header file included in your project. Otherwise, undefined.
283
+
- **_WCHAR_T_DEFINED** Defined as 1 when the default [/Zc:wchar_t](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) compiler option is set. The **_WCHAR_T_DEFINED** macro is defined but has no value if the `/Zc:wchar_t-` compiler option is set, and **wchar_t** is defined in a system header file included in your project. Otherwise, undefined.
284
284
285
285
- **_WIN32** Defined as 1 when the compilation target is 32-bit ARM, 64-bit ARM, x86, or x64. Otherwise, undefined.
286
286
@@ -298,4 +298,4 @@ Microsoft Visual C++ supports these additional predefined macros.
Copy file name to clipboardExpand all lines: docs/preprocessor/preprocessor-directives.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@ ms.workload: ["cplusplus"]
13
13
---
14
14
# Preprocessor Directives
15
15
16
-
Preprocessor directives, such as `#define` and **#ifdef**, are typically used to make source programs easy to change and easy to compile in different execution environments. Directives in the source file tell the preprocessor to perform specific actions. For example, the preprocessor can replace tokens in the text, insert the contents of other files into the source file, or suppress compilation of part of the file by removing sections of text. Preprocessor lines are recognized and carried out before macro expansion. Therefore, if a macro expands into something that looks like a preprocessor command, that command is not recognized by the preprocessor.
16
+
Preprocessor directives, such as `#define` and `#ifdef`, are typically used to make source programs easy to change and easy to compile in different execution environments. Directives in the source file tell the preprocessor to perform specific actions. For example, the preprocessor can replace tokens in the text, insert the contents of other files into the source file, or suppress compilation of part of the file by removing sections of text. Preprocessor lines are recognized and carried out before macro expansion. Therefore, if a macro expands into something that looks like a preprocessor command, that command is not recognized by the preprocessor.
17
17
18
-
Preprocessor statements use the same character set as source file statements, with the exception that escape sequences are not supported. The character set used in preprocessor statements is the same as the [execution character set](http://msdn.microsoft.com/en-us/a7901c61-524d-47c6-beb6-d9dacc2e72ed). The preprocessor also recognizes negative character values.
18
+
Preprocessor statements use the same character set as source file statements, with the exception that escape sequences are not supported. The character set used in preprocessor statements is the same as the [execution character set](http://msdn.microsoft.com/a7901c61-524d-47c6-beb6-d9dacc2e72ed). The preprocessor also recognizes negative character values.
19
19
20
20
The preprocessor recognizes the following directives:
> The following nonterminals are expanded in the [Lexical Conventions](../cpp/lexical-conventions.md) section of the *C++ Language Reference*: `constant`, `constant`-*expression*, *identifier*, *keyword*, `operator`, and `punctuator`.
97
+
> The following nonterminals are expanded in the [Lexical Conventions](../cpp/lexical-conventions.md) section of the *C++ Language Reference*: `constant`, `constant`-*expression*, *identifier*, *keyword*, `operator`, and `punctuator`.
Copy file name to clipboardExpand all lines: docs/preprocessor/preprocessor-operators.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: "corob"
12
12
ms.workload: ["cplusplus"]
13
13
---
14
14
# Preprocessor Operators
15
-
Four preprocessor-specific operators are used in the context of the `#define` directive (see the following list for a summary of each). The stringizing, charizing, and token-pasting operators are discussed in the next three sections. For information on the **defined** operator, see [The #if, #elif, #else, and #endif Directives](../preprocessor/hash-if-hash-elif-hash-else-and-hash-endif-directives-c-cpp.md).
15
+
Four preprocessor-specific operators are used in the context of the `#define` directive (see the following list for a summary of each). The stringizing, charizing, and token-pasting operators are discussed in the next three sections. For information on the `defined` operator, see [The #if, #elif, #else, and #endif Directives](../preprocessor/hash-if-hash-elif-hash-else-and-hash-endif-directives-c-cpp.md).
16
16
17
17
|Operator|Action|
18
18
|--------------|------------|
@@ -22,6 +22,7 @@ Four preprocessor-specific operators are used in the context of the `#define` di
22
22
|[defined operator](../preprocessor/hash-if-hash-elif-hash-else-and-hash-endif-directives-c-cpp.md)|Simplifies the writing of compound expressions in certain macro directives|
Copy file name to clipboardExpand all lines: docs/preprocessor/preprocessor.md
+14-12
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,29 @@ ms.workload: ["cplusplus"]
14
14
# Preprocessor
15
15
The preprocessor is a text processor that manipulates the text of a source file as part of the first phase of translation. The preprocessor does not parse the source text, but it does break it up into tokens for the purpose of locating macro calls. Although the compiler ordinarily invokes the preprocessor in its first pass, the preprocessor can also be invoked separately to process text without compiling.
16
16
17
-
The reference material on the preprocessor includes the following sections:
17
+
The reference material on the preprocessor includes the following sections:
You can obtain a listing of your source code after preprocessing by using the [/E](../build/reference/e-preprocess-to-stdout.md) or [/EP](../build/reference/ep-preprocess-to-stdout-without-hash-line-directives.md) compiler option. Both options invoke the preprocessor and output the resulting text to the standard output device, which, in most cases, is the console. The difference between the two options is that /E includes `#line` directives and /EP strips these directives out.
29
+
You can obtain a listing of your source code after preprocessing by using the [/E](../build/reference/e-preprocess-to-stdout.md) or [/EP](../build/reference/ep-preprocess-to-stdout-without-hash-line-directives.md) compiler option. Both options invoke the preprocessor and output the resulting text to the standard output device, which, in most cases, is the console. The difference between the two options is that /E includes `#line` directives and /EP strips these directives out.
30
30
31
-
**END Microsoft Specific**
31
+
**END Microsoft Specific**
32
32
33
33
## <aname="_predir_special_terminology"></a> Special Terminology
34
-
In the preprocessor documentation, the term "argument" refers to the entity that is passed to a function. In some cases, it is modified by "actual" or "formal," which describes the argument expression specified in the function call and the argument declaration specified in the function definition, respectively.
34
+
35
+
In the preprocessor documentation, the term "argument" refers to the entity that is passed to a function. In some cases, it is modified by "actual" or "formal," which describes the argument expression specified in the function call and the argument declaration specified in the function definition, respectively.
35
36
36
-
The term "variable" refers to a simple C-type data object. The term "object" refers to both C++ objects and variables; it is an inclusive term.
37
+
The term "variable" refers to a simple C-type data object. The term "object" refers to both C++ objects and variables; it is an inclusive term.
0 commit comments