Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MrC/MrCpp Predefined Symbols


The MrC and MrCpp compilers support the predefined symbols specified by the ANSI C language definition, as well as their own predefined symbols for use in conditional compilation. The tables below list the predefined symbols and their meanings.

ANSI predefined symbols:

__DATE__ The date of compilation of the source file.
__TIME__ The time of compilation of the source file.
__LINE__ The line number of the current source line (a decimal constant).
__FILE__ The current source or include file filename.
__STDC__ 0 if -ansi off, 1 if -ansi strict or -ansi on
__FPCE__ 1 to indicate conformance with NCEG/IEEE floating point standards.
__FPCE_IEEE__ 1 to indicate conformance with NCEG/IEEE floating point standards.

MrC/MrCpp predefined symbols:

__MRC__ MrC is being used. The version number is encoded in hex.
MPW_C MrC is being used.
MPW_CPLUS MrCpp is being used.
__cplusplus Value is 1 if compiling with MrCpp.
macintosh Code is compiled for Macintosh.
__MC601 Code is compiled for the PowerPC 601 processor.
__POWERPC Code is compiled for a PowerPC processor.
__POWERPC__ Code is compiled for a PowerPC processor.
powerc Code is compiled for a PowerPC processor.
__powerc Code is compiled for a PowerPC processor.
__useAppleExts__ Apple extensions are used and -ansi strict is not specified.
_CHAR_UNSIGNED 1 if -char unsigned (chars are treated as unsigned).
__EXCEPTIONS__ 1 if -exceptions on (C++ exceptions are supported).
_LONG_LONG 1 if -longlong on (support long long data types).
__SOM_ENABLED__ 1 if -som (direct-to-SOM enabled compilation).
__WCHAR_T__ Always 1 in MrCpp (recognize wchar_t as a data type).
__VEC__ 1 if -vec on (recognize AltiVec extensions).
__ALTIVEC__ Always 1 (implies support of AltiVec pragmas).

 
Back to MPW Home Page
Back to MPW Home Page