Menu

Compilers

There is a newer version of this page. You can find it here.

Please send updates/corrections to predef-contribute.

ACC

Type Macro
Identification _ACC_

Altium MicroBlaze C

Type Macro Format Description
Identification __CMB__
Version __VERSION__ VRRR V=Version
RRR=Revision
Version __REVISION__ P P=Patch
Version __BUILD__ VRRRPPP Build number
Example
Altium MicroBlaze C __VERSION__ __REVISION__ __BUILD__
1.0r2 1000 2
1.22.2 1022001

Altium C-to-Hardware

Type Macro Format Description
Identification __CHC__
Version __VERSION__ VRRR V=Version
RRR=Revision
Version __REVISION__ P P=Patch
Beta releases set this to -1
Version __BUILD__ VRRRPPP Build number
Example
Altium C-to-Hardware __VERSION__ __REVISION__ __BUILD__
2.1r1 2001 1
1.22.2 1022001

Amsterdam Compiler Kit

Type Macro
Identification __ACK__

ARM Compiler

Type Macro Format Description
Identification __CC_ARM
Version __ARMCC_VERSION VRPBBB V = Version
R = Revision
P = Patch
BBB = Build

Notice that the __ARMCC_VERSION macro is also used as version indicator for Norcroft C, but that the format is different.

Example
Realview C __ARMCC_VERSION
3.0 300503

Aztec C

Type Macro Format Description
Identification AZTEC_C
__AZTEC_C__
Version __VERSION VRR V = Version
RR = Revision
Example
Aztec C __VERSION
5.20 520

Borland C++

Type Macro Format
Identification __BORLANDC__
Version __BORLANDC__ ?
Identification __CODEGEARC__
Version __CODEGEARC__ ?
Example
Borland C++ C++ Builder __BORLANDC__ __CODEGEARC__
2.0 0x200
3.0 0x400
3.1 0x410
4.0 0x452
5.0 0x500
5.02 1.0 0x520
3.0 0x530
4.0 0x540
5.5 5.0 0x550
5.51 0x551
5.6.4 0x562
2009 0x613 0x613
2010 0x621 0x621

CC65

Type Macro Format Description
Identification __CC65__
Version __CC65__ 0xVRP V = Version
R = Revision
P = Patch
Example
Version __CC65__
2.10.1 0x2A1

Clang

Type Macro Format
Identification __clang__
Version __clang_major__ Version
Version __clang_minor__ Revision
Version __clang_patchlevel__ Patch

Notice that clang also defines the GNU C version macros, but you should use the clang feature checking macros to detect the availability of various features.

Comeau C++

Type Macro Format Description
Identification __COMO__
Version __COMO_VERSION__ VRR V = Version
RR = Revision
Example
Comeau C++ __COMO_VERSION__
2.3 230

Compaq C/C++

Type Macro Format Description
Identification __DECC C compiler
Version __DECC_VER VVRRTPPPP VV = Version
RR = Revision
T = Type (9 = official)
PPPP = Patch
Identification __DECCXX C++ compiler
Version __DECCXX_VER As __DECC_VER
Identification __VAXC Obsolete
Identification VAXC Obsolete
Example
Compaq C/C++ __DECC_VER
6.0-001 60090001

MongoDB Logo MongoDB