Lcc-win32
defines the following symbols:[1]
|
Symbol |
Meaning |
|
__STDC__ |
Defined
to 1. This identifies lcc-win32 as an ANSI C compiler. |
|
__DATE__ |
Contains
the current compilation date in the format: MMM DD YYY as a character
string. |
|
__TIME__ |
Contains
the current time as a character string in the format: HH:MM:SS Note that
this “timer” does not change, even if the compilation takes a long
time. |
|
__FILE__ |
Contains
the name of the current file without any path component as a character
string. |
|
__func__ |
This
symbol will be expanded by the compiler to a character string containing
the name of the current function being compiled, or the character string “<none>”if
no function is currently being defined.[2] |
|
__LINE__ |
This
symbol will be expanded to an integer containing the current line number
in the source file. Note that this line number can be changed to an
arbitrary value with the #
line directive. |
|
__LCC__ |
Allows
you to conditionally compile source for the lcc compiler. |
|
__LCCOPTIMLEVEL |
If
optimization is on, i.e., the –O option was given in the command line or
if the #pragma optimize was parsed, this preprocessor variable will have
the value one. If no optimizations are active, its value is zero. |
|
__LCCDEBUGLEVEL |
If
the compiler is called with the –g<n>
option (debug level n) the
value of LCCDEBUGLEVEL
is n. If there is no –g in the compiler’s command line, then its value
is zero. |
|
RC_INVOKED |
Defined
by the resource compiler when active. |
|
WINVER |
Contains
a two-byte number with the major version number of windows in the high
byte, and the minor version number in the low byte. This value is
determined at compile time. Note that this predefined symbol CAN be
changed with the #undef directive. |
|
WIN32 _WIN32 |
Defined
to 1. Note that contrary to other predefined symbols, this symbol can be
undefined with the #undef directive. |
|
__int64 |
Defined
as the long long integer type for compatibility with the Microsoft compiler. |
|
__cdecl
__inline _cdecl _huge |
Defined
to the empty string for compatibility reasons. |
[1]
Note that none of this identifiers can be undefined with the #undef
macro directive.
[2] The standard gives the following definition for this:
“The identifier _ _func_ _ shall be implicitly declared by the translator as if, immediately following the opening brace of each function definition, the declaration static const char _ _func_ _[]="function-name"; appeared, where function-name is the name of the lexically-enclosing function.”.
WG14/N843 ANSI standard page 45. Note that the behavior of lcc-win32 is more lenient: the symbol still has a valid value outside a function.