Predefined Preprocessor Identifiers (Windows CE 5.0)
Both the ANSI-specific and Microsoft-specific predefined identifiers are described in the following lists.
If a predefined identifier has two forms, one with and one without an underscore, the command-line driver defines both if you specify the /Ze - Enable Language Extensions option. It defines only the leading underscore form if you specify the /Za - Disable Language Extensions option to compile for ANSI compatibility.
The following table shows the predefined identifiers supported by the compiler.
Identifier | Description |
---|---|
_CHAR_UNSIGNED | Default char type is unsigned. Defined when /J - Change Default char Type is specified. Microsoft specific. |
__cplusplus | Identifies a C++ program. |
__DATE__ | The compilation date of the current source file. The date is a string literal of the form "Mmm dd yyyy". ANSI-specific. |
__FILE__ | The name of the current source file __FILE__ expands to a string surrounded by double quotation marks. |
__LINE__ | The line number in the current source file. The line number is a decimal integer constant. It can be altered with a #line directive. ANSI-specific. |
_MSC_VER | Defines the compiler version in the form: "ddd". Defined as 1201 for Microsoft C/C++. |
_MSDOS | Identifies target operating system as MS-DOS. Microsoft-specific. |
_M_ARM | Defined as 4 for ARM. |
_M_ARMT | Defined as 4 for Thumb. |
__STDC__ | Indicates full conformance with the ANSI C standard. Defined as the integer constant 1 only if the /Za command-line option is given; otherwise is undefined. ANSI-specific. |
__TIME__ | The most recent compilation time of the current source file. The time is a string literal of the form "hh:mm:ss". ANSI-specific. |
__TIMESTAMP__ | The date and time of the last modification of the source file, expressed as a string literal in the form: "Ddd Mmm Date hh:mm:ss yyyy" where Ddd is the abbreviated day of the week such as Wed and Date is an integer from 1 to 31. Microsoft-specific. |
See Also
/J - Change Default char Type | /Za - Disable Language Extensions | /Ze - Enable Language Extensions
Send Feedback on this topic to the authors