[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Metrowerks Predefined Symbols

The table below lists additional symbols that Metrowerks C and C++ provides which are not defined as part of the ANSI/ISO C and C++ standards.

Predefined symbols for Metrowerks:

This macro
is
__A5__  

defined as 1 if data is A5-relative, 0 if data is A4 relative. This symbol is defined for 68K compilers. It is undefined for other target platforms.

__ALTIVEC__  

currently defined as "100000000" when PowerPC Altivec features are turned on using pragma altivec_model is on.

__cplusplus  

defined as "199711L" if you're compiling this file as a C++ file, undefined if you're compiling this file as a C file. The value "199711L" indicates conformance with the ANSI/ISO C++ specification.

__embedded_cplusplus  

defined as 1 if Embedded C++ is activated. This symbol is undefined if Embedded C++ is not activated. See

__embedded__  
defined as 1 if you are compiling code for an embedded target.  
__FUNCTION__  

defined as the name of the function that is currently being compiled.

__fourbyteints__  

defined as 1, if you turn on the 4-byte Ints option in the 68K Processor settings panel. 0, if you turn off that option. This symbol is defined for 68K compilers. It is undefined for other platforms.

__IEEEdoubles__  

defined as 1 if you turn on the 8-Byte Doubles option in the 68K Processor settings panel. 0, if you turn off that option. This symbol is defined for 68K compilers. It is undefined for all other target platforms.

__INTEL__  

defined as 1 if you're compiling this code with the x86 compiler and undefined for all other target platforms.

__MC68K__  

defined as 1 if you're compiling this code with the 68K compiler and undefined for all other target platforms.

__MC68020__  

defined as 1 if you turn on the 68020 Codegen option in the Processor settings panel, 0 if you turn that option off. This symbol is defined for 68K compilers. It is undefined for all other target platforms.

__MC68881__  

defined as 1 if you turn on the 68881 Codegen option in the 68K Processor settings panel, 0 if you turn that option off. This symbol is defined for 68K compilers and undefined for all other target platforms.

__MIPS__  

defined as 1 for MIPS compilers and undefined for other target platforms.

__MIPS_ISA2__  

defined as 1 if the compiler's target platform is MIPS and you select the ISA II checkbox in the MIPS Processor settings panel. Undefined if you deselect the checkbox. It is always undefined for other target platforms.

__MIPS_ISA3__  

defined as 1 if the compiler's target platform is MIPS and you select the ISA III checkbox in the MIPS Processor settings panel. Undefined if you deselect the checkbox. It is always undefined for other target platforms.

__MIPS_ISA4__  

defined as 1 if the compiler's target platform is MIPS and you select the ISA IV checkbox in the MIPS Processor settings panel. Undefined if you deselect the checkbox. It is always undefined for other target platforms

__MWBROWSER__  

defined as 1 if the CodeWarrior browser is parsing your code. 0, otherwise.

__MWERKS__  

defined as the version number of the Metrowerks C/C++ compiler, if you're using CodeWarrior CW7 or later. For example, in Metrowerks C/C++ version 2.2 __MWERKS__ would be 0x2200. This macro is defined as 1 if the compiler was issued before CodeWarrior CW7.

__PRETTY_FUNCTION__  

defined as the name of the qualified ("mangled") C++ function that is currently being compiled. This macro is only defined when the C++ compiler is active. See "C++ Compiler" for related information.

__profile__  

1, if you turn on the Generate Profiler Calls option in the Processor settings panel. 0, if you turn that option off.

__powerc, powerc, __POWERPC__  

1, if you're compiling this code with the PowerPC compiler. 0, otherwise.

__VEC__  

defined as the version of Motorola's AltiVec Technology Programming Interface Manual that the compiler conforms to. This value takes the form vrrnn which corresponds to Programming Interface Manual's version number (v.rr.nn). This macro is undefined otherwise. See "altivec_model" for related information.

macintosh  

1 if you're compiling this code with the 68K or PowerPC compilers for Mac OS. 0 otherwise.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000