else

July 5, 2025 ยท View on GitHub

Please send updates/corrections to predef-contribute or through pull requests on GitHub.

ACC

TypeMacro
Identification_ACC_

Altium MicroBlaze C

TypeMacroFormatDescription
Identification__CMB__
Version__VERSION__VRRRV=Version
RRR=Revision
Version__REVISION__PP=Patch
Version__BUILD__VRRRPPPBuild number
Example
Altium MicroBlaze C__VERSION____REVISION____BUILD__
1.0r210002
1.22.21022001

Altium C-to-Hardware

TypeMacroFormatDescription
Identification__CHC__
Version__VERSION__VRRRV=Version
RRR=Revision
Version__REVISION__PP=Patch
Beta releases set this to -1
Version__BUILD__VRRRPPPBuild number
Example
Altium C-to-Hardware__VERSION____REVISION____BUILD__
2.1r120011
1.22.21022001

Amsterdam Compiler Kit

TypeMacro
Identification__ACK__

ARM Compiler

TypeMacroFormatDescription
Identification__CC_ARM
Version__ARMCC_VERSIONVRPBBBV = 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.0300503

Aztec C

TypeMacroFormatDescription
IdentificationAZTEC_C
__AZTEC_C__
Version__VERSIONVRRV = Version
RR = Revision
Example
Aztec C__VERSION
5.20520

Borland C++

TypeMacroFormat
Identification__BORLANDC__
Version__BORLANDC__?
Identification__CODEGEARC__
Version__CODEGEARC__From C++ Builder 2006
Example
Borland C++C++ Builder__BORLANDC____CODEGEARC__
2.00x200
3.00x400
3.10x410
4.00x452
5.00x500
5.021.00x520
3.00x530
4.00x540
5.55.00x550
5.510x551
5.6.40x562
20060x5700x570
20070x5900x590
20090x6130x613
20100x6210x621
XE0x6300x630
XE20x6400x640
XE30x6500x650
XE40x6600x660

CC65

TypeMacroFormatDescription
Identification__CC65__
Version__CC65__0xVRPV = Version
R = Revision
P = Patch
Example
Version__CC65__
2.10.10x2A1

Clang

TypeMacroFormatDescription
Identification__clang__
Version__clang_major__VV = Major version
Version__clang_minor__RR = Minor version
Version__clang_patchlevel__PP = Patch level
Version__clang_version__V.R.P (tags/RELEASE_VRP/final)V = Major version
R = Minor version
P = Patch level

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.

The values of the __clang_major__, __clang_minor__, and __clang_patchlevel__ macros are not consistent across distributions of the Clang compiler. For example, the Clang 3.1 distribution available at http://clang.llvm.org defines __clang_major__ and __clang_minor__ as 3 and 1 respectively. The version of Clang distributed with Apple Xcode 4.4 is branded as "Apple Clang 4.0" and derives from the open source Clang 3.1 distribution, but defines these macros with the values 4 and 0 respectively. Apple's Clang distribution can be identified by the presence of the __apple_build_version__ macro.

The meaning of the __clang__ and related macros has changed subtly over the years, from identifying the Clang compiler to identifying compilers that use the Clang infrastructure. For example, IBM XL C/C++ also defines these macros. IBM XL C/C++ for Linux defines them starting from version 13.1.1. IBM XL C/C++ for AIX defines them starting from version 16.1.

Comeau C++

TypeMacroFormatDescription
Identification__COMO__
Version__COMO_VERSION__VRRV = Version
RR = Revision
Example
Comeau C++__COMO_VERSION__
2.3230

Compaq C/C++

TypeMacroFormatDescription
Identification__DECCC compiler
Version__DECC_VERVVRRTPPPPVV = Version
RR = Revision
T = Type (9 = official)
PPPP = Patch
Identification__DECCXXC++ compiler
Version__DECCXX_VERAs __DECC_VER
Identification__VAXCObsolete
IdentificationVAXCObsolete
Example
Compaq C/C++__DECC_VER
6.0-00160090001

Convex C

TypeMacro
Identification__convexc__

CompCert

TypeMacro
Identification__COMPCERT__

Coverity C/C++ Static Analyzer

TypeMacro
Identification__COVERITY__

Cray C

TypeMacroDescription
Identification_CRAYC
Version_RELEASEVersion
Version_RELEASE_MINORRevision

Diab C/C++

TypeMacroFormatDescription
Identification__DCC__1
Version__VERSION_NUMBER__VRPPV = Version
R = Revision
PP = Patch
Example
Diab C/C++__VERSION_NUMBER__
4.4g4426

DICE C

TypeMacro
Identification_DICE

Digital Mars

TypeMacroFormatDescription
Identification__DMC__
Version__DMC__0xVRPV = Version
R = Revision
P = Patch
Example
Digital Mars__DMC__
7.00x700
7.20x720
8.00x800

Dignus Systems/C++

TypeMacroFormatDescription
Identification__SYSC__
Version__SYSC_VER__VRRPPV = Version
RR = Revision
PP = Patch
Example
Systems/C__SYSC_VER__
1.80.3218032

DJGPP

TypeMacroDescription
Identification__DJGPP__
Version__DJGPP__Version
Version__DJGPP_MINOR__Revision
Identification__GO32__Defined by DJGPP 1.x
Example
DJGPP__DJGPP____DJGPP_MINOR__
2.0121

EDG C++ Frontend

TypeMacroFormatDescription
Identification__EDG__
Version__EDG_VERSION__VRRV = Version
RR = Revision
Example
EDG C++__EDG_VERSION__
2.30230
2.45245

EKOPath

TypeMacroDescription
Identification__PATHCC__
Version__PATHCC__Version
Version__PATHCC_MINOR__Revision
Version__PATHCC_PATCHLEVEL__Patch
Example
EKOPath__PATHCC____PATHCC_MINOR____PATHCC_PATCHLEVEL__
2.0200

Fujitsu C++

TypeMacro
Identification__FCC_VERSION

GCC C/C++

TypeMacroDescription
Identification__GNUC__
Version__GNUC__Version
Version__GNUC_MINOR__Revision
Version__GNUC_PATCHLEVEL__Patch (introduced in version 3.0)

Notice that the meaning of the __GNUC__ macro has changed subtly over the years, from identifying the GNU C/C++ compiler to identifying any compiler that implements the GNU compiler extensions (see the Feature request - a macro defined for GCC discussion for further information). For example, the Intel C++ on Linux also defines these macros from version 8.1 (see the Intel C++ Compiler 8.1 for Linux Release Notes and Intel Compilers for Linux: Compatibility with GNU Compilers.)

Example
GNU C/C++__GNUC____GNUC_MINOR____GNUC_PATCHLEVEL__
2.7.x27N/A
3.0.2302

Alternative Version

If you prefer a single version macro, you can define the following yourself.

#if defined(__GNUC__)
# if defined(__GNUC_PATCHLEVEL__)
# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
# else
# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100)
# endif
#endif

The format of this new macro is:

TypeMacroFormatDescription
Version__GNUC_VERSION__VVRRPPVV = Version
RR = Revision
PP = Patch
Example of Alternative Version
GNU C/C++__GNUC_VERSION__
2.7.x20700
3.0.230002

Green Hill C/C++

TypeMacroFormatDescription
Identification__ghs__
Version__GHS_VERSION_NUMBER__VRPV = Version
R = Revision
P = Patch
Version__GHS_REVISION_DATE__Epoch time
Example
Green Hill C/C++__GHS_VERSION_NUMBER__
4.2.1421

HP ANSI C

TypeMacro
Identification__HP_cc

HP aC++

TypeMacroFormatDescription
Identification__HP_aCC
Version__HP_aCC1From version A.01.15 (and A.03.13)
Version__HP_aCCVVRRPPVV = Version
RR = Revision
PP = Patch

From version A.01.21 (and A.03.25)
Example
HP aCC__HP_aCC
A.01.2112100

IAR C/C++

TypeMacroFormatDescription
Identification__IAR_SYSTEMS_ICC__
Version__VER__VRRV = Version
RR = Revision
Example
IAR C/C++__VER__
3.34334

IBM XL C/C++ (Clang-based versions)

The entry on XL C/C++ has been split into three for clarity. This entry covers the following versions: IBM XL C/C++ for Linux for little endian distributions version 13.1.1 and later IBM XL C/C++ for AIX version 16.1 and later (Clang-based compiler invocation only, see next section for legacy compiler invocation) Clang-based versions of IBM XL C/C++ define the Clang macros listed in the Clang section. Specify -qxlcompatmacros to also define the legacy macros listed in IBM XL C/C++ (legacy versions). This is useful when you migrate programs from IBM XL C/C++ (legacy versions) to IBM XL C/C++ (Clang-based versions).

TypeMacroFormatDescription
Identification__ibmxl__C and C++ compiler
__clang__
Version__ibmxl_vrm__0xVVRRMM00VV = Version
RR = Release
MM = Modification
__ibmxl_version__VV = Version
__ibmxl_release__RR = Release
__ibmxl_modification__MM = Modification
__ibmxl_ptf_fix_level__FF = Fix Pack
Example
IBM XL C/C++__ibmxl_vrm__
13.1.6.10x0D010600
16.1.0.00x10010000

IBM XL C/C++ (legacy versions)

The entry on XL C/C++ has been split into three for clarity. This entry covers the following versions: IBM XL C/C++ for Linux for big endian distributions IBM XL C/C++ for AIX (Note: starting in version 16.1, IBM XL C/C++ for AIX also offers a Clang-based compiler invocation, see the Clang-based versions section above for that compiler invocation)

Clang-based versions of IBM XL C/C++ will also define the legacy macros listed in this section when -qxlcompatmacros is specified.

TypeMacroFormatDescription
Identification__xlC__C and C++ compiler
Version__IBMC__0xVVRRMMC compiler

VV = Version
RR = Release
MM = Modification
__IBMCPP__0xVVRRMMC++ compiler

VV = Version
RR = Release
MM = Modification
__xlc__0xVVRRMMFFC compiler

VV = Version
RR = Release
MM = Modification
FF = Fix Pack
__xlC__0xVVRRC and C++ compiler

VV = Version
RR = Release
__xlC_ver__0x0000MMFFMM = Modification
FF = Fix Pack
Example
IBM XL C/C++__IBMCPP____xlC____xlC_ver__
13.1.3.50x0D01030x0D010x00000305
12.1.0.40x0C01000x0C010x00000004

IBM z/OS XL C/C++

The entry on XL C/C++ has been split into three for clarity. This entry covers the XL C/C++ compiler for mainframes (e.g. z/OS).

TypeMacroFormatDescription
Identification__IBMC__C compiler
__IBMCPP__C++ compiler
Version__IBMC__
__IBMCPP__
NVRRMN = Product (0 = C/370, 1 = MVS, 2 = OS/390, 4 = z/OS)
V = Version
RR = Revision
M = Modification
__COMPILER_VER__0xNVRRMMFFN = Product (see above)
V = Version
RR = Revision
MM = Modification
FF = Fix Pack

Notice that XL C/C++ also defines __IBMC__ and __IBMCPP__ macros, but with a different syntax. You can use __xlC__ (only defined for XL C/C++) or __COMPILER_VER__ (only defined for z/OS XL C/C++) to distinguish between the two. Alternatively, the macro identifying z/OS (__MVS__) can be used to distinguish between them.

#if defined(__IBMC__) || defined(__IBMCPP__)
# if defined(__COMPILER_VER__)
/* z/OS XL C/C++ so __IBMC__ is defined as NVRRM */
# else
/* z/OS XL C/C++ so __IBMC__ is defined as VRM */
# endif
#endif
Example
IBM z/OS XL C/C++__IBMC____COMPILER_VER__
2.3420300x42030000

IBM XL C/C++ for z/VM

TypeMacroFormatDescription
Version__IBMC__C Compiler
Version__IBMCPP__C++ Compiler
Version__COMPILER_VER__
Example
XL C/C++ for z/VM Version__IBMC____IBMCPP____COMPILER_VER__
V1.341120411200x410C0000

IBM C for VM/ESA

TypeMacroFormatDescription
Version__IBMC__VRM3-digit decimal number
V = Version
R = Release
M = Modification
Version__COMPILER_VER__
Example
Version__IBMC____COMPILER_VER__
Version 3 Release 1 Modification 03100x13010000

ImageCraft C

TypeMacro
Identification__IMAGECRAFT__

Intel C/C++

TypeMacroFormatDescription
Identification__INTEL_COMPILER
Identification__ICC
Identification__ECCObsolete
Identification__ICL
Version__INTEL_COMPILERVRV = Version
R = Revision
Version__INTEL_COMPILER_UPDATEPP = Patch
Version__INTEL_COMPILER_BUILD_DATEYYYYMMDDYYYY = Year
MM = Month
DD = Day
Example
Intel C/C++__INTEL_COMPILER/__ICC__INTEL_COMPILER_UPDATE__INTEL_COMPILER_BUILD_DATE
5.0500
6.0600
8.0800
9.090020060222
13.0.1130020121010
16.0.31600320160415
17.0.01700020160721
18.0.01800020170811
19.0.01900020180804
19.0.11900020181018
2021.1.22021120201208
2021.2.02021220210228
2021.3.02021320210609

KAI C++

TypeMacroFormatDescription
Identification__KCC
Version__KCC_VERSION0xVRPPV = Version
R = Revision
PP = Patch (a = 01, b = 02, ...)
Example
KAI C++__KCC_VERSION
4.0d4004

KEIL CARM

TypeMacroFormatDescription
Identification__CA__
Identification__KEIL__
Version__CA__VRRV = Version
RR = Revision
Example
Keil CARM__CA__
1.01101

KEIL C166

TypeMacroFormatDescription
Identification__C166__
Version__C166__VRRV = Version
RR = Revision
Example
Keil C166__C166__
5.01501

KEIL C51

TypeMacroFormatDescription
Identification__C51__
Identification__CX51__
Version__C51__VRRV = Version
RR = Revision
Example
Keil C51__C51__
7.01701

LCC

TypeMacro
Identification__LCC__

LLVM

TypeMacro
Identification__llvm__

The Clang compiler has an expectation that it operates in conjunction with the LLVM compiler, so the Clang compiler defines __llvm__ too. IBM XL C/C++ (Clang-based versions) use Clang infrastructure, so IBM XL C/C++ for Linux versions 13.1.1 to 16.1 also define __llvm__. Starting from version 16.1.1, IBM XL C/C++ for Linux no longer defines __llvm__.

MCST lcc

TypeMacroFormatDescription
Identification__LCC__
Identification__MCST__From 1.25
Version__LCC__VRRV = Version
R = Revision
Version__LCC_MINOR__PP = Patch

Not to be confused with LCC. MCST lcc compiler uses Edison Design Group C++ frontend, so __EDG__ is also expected to be defined.

Example
MCST lcc__LCC____LCC_MINOR__
1.25.1912519
1.26.041264

MetaWare High C/C++

TypeMacro
Identification__HIGHC__

Metrowerks CodeWarrior

TypeMacroFormatDescription
Identification__MWERKS__
Identification__CWCC__From 4.2.0
Version__MWERKS__1Until CodeWarrior 7
Version__MWERKS__0xVRPPV = Version
R = Revision
PP = Patch

From CodeWarrior 7
Version__CWCC__0xVRPPV = Version
R = Revision
PP = Patch

From 4.2.0
Example
Metrowerks C/C++__MWERKS____CWCC__
2.00x2000
2.20x2200
4.2.00x42000x4200

Microsoft Visual C++

TypeMacroFormatDescription
Identification_MSC_VER
Version_MSC_VERVVRRVV = Version
RR = Revision
Version_MSC_FULL_VERVVRRPPPPVV = Version
RR = Revision
PPPP = Patch

From Visual C++ 6.0 Processor Pack
Version_MSC_FULL_VERVVRRPPPPPVV = Version
RR = Revision
PPPPP = Patch

From Visual C++ 8.0
Version_MSC_BUILDBB = Build number

From Visual C++ 9.0

Intel's compiler also defines _MSC_VER and _MSC_FULL_VER on Windows. (1) You can exclude it by checking that __INTEL_COMPILER is not defined.

Clang also defines _MSC_VER and _MSC_FULL_VER when run as clang-cl.exe or when the target tuple ends in -msvc. You can exclude it by checking that __clang__ is not defined.

Example
Visual C++ 1 2_MSC_VER_MSC_FULL_VER
1.0800
3.0900
4.01000
4.21020
5.01100
6.01200
6.0 SP6120012008804
7.0130013009466
7.1 (2003)131013103077
8.0 (2005)1400140050727
9.0 (2008)1500150021022
9.0 SP11500150030729
10.0 (2010)1600160030319
10.0 (2010) SP11600160040219
11.0 (2012)1700170050727
12.0 (2013)1800180021005
14.0 (2015)1900190023026
14.0 (2015 Update 1)1900190023506
14.0 (2015 Update 2)1900190023918
14.0 (2015 Update 3)1900190024210
15.0 (2017)1910191025017
15.3 (2017)1911
15.5 (2017)1912
15.6 (2017)1913
15.7 (2017)1914191426428
15.8 (2017)1915191526726
15.9 (2017)1916191627023
16.0 (2019)1920192027508
16.1 (2019)1921192127702
16.2 (2019)1922192227905
16.3 (2019)1923192328105
16.4 (2019)1924192428314
16.5 (2019)1925192528614
16.6 (2019)1926192628808
16.7 (2019)1927192729117
16.8 (2019)1928192829333
16.9 (2019)1928192829919
16.10 (2019)1929192930040
16.11 (2019)1929192930133
17.0 (2022)1930
17.1 (2022)1931193131107
17.2 (2022)1932193231332

Microtec C/C++

TypeMacro
Identification_MRI

Microway NDP C

TypeMacro
Identification__NDPC__
__NDPX__

MinGW and MinGW-w64

MinGW (formerly known as MinGW32) is a toolchain for creating 32 Bit Windows executables. The MinGW-w64 projects offers toolchains for creating 32 Bit and 64 Bit Windows executables. The following table shows which macros are defined by each toolchain:

TypeMacroDescriptionMinGW32MinGW-w64 32 BitMinGW-w64 64 Bit
Identification__MINGW32__defineddefineddefined
Version__MINGW32_MAJOR_VERSIONVersiondefineddefineddefined
Version__MINGW32_MINOR_VERSIONRevisiondefineddefineddefined
Identification__MINGW64__--defined
Version__MINGW64_VERSION_MAJORVersion-defineddefined
Version__MINGW64_VERSION_MINORRevision-defineddefined

Notice that __MINGW32_MAJOR_VERSION, __MINGW32_MINOR_VERSION, __MINGW64_VERSION_MAJOR, and __MINGW64_VERSION_MINOR are only defined if appropriate headers are included. Appropriate headers are <stdlib.h>, <stdio.h>, <windows.h>, <windef.h>, and probably more.

Examples
__MINGW32_MAJOR_VERSION__MINGW32_MINOR_VERSION__MINGW64_VERSION_MAJOR__MINGW64_VERSION_MINORDescription
24MinGW32 2.4
320MinGW32 3.20
31120MinGW-w64 2.0

MIPSpro

TypeMacroFormatDescription
Identification__sgi
Identificationsgi
Version_COMPILER_VERSIONVRPV = Version
R = Revision
P = Patch

Until ?
Version_SGI_COMPILER_VERSIONVRPV = Version
R = Revision
P = Patch

From ?
Example
MIPSpro_COMPILER_VERSION_SGI_COMPILER_VERSION
6.0.2602
7.2.1721
7.4.4744

Miracle C

TypeMacro
IdentificationMIRACLE

MPW C++

TypeMacroFormatDescription
Identification__MRC__
IdentificationMPW_C
IdentificationMPW_CPLUS
Version__MRC__0xVVRRVV = Version
RR = Revision
Example
MPW C++__MRC__
5.00x500

Norcroft C

TypeMacroFormatDescription
Identification__CC_NORCROFT
Version__ARMCC_VERSIONV.RV = Version
R = Revision

Notice that __ARMCC_VERSION is assigned a floating-point number, so it cannot be used by the preprocessor to compare versions.

Example
Norcroft C__ARMCC_VERSION
4.694.69
4.904.90

NWCC

TypeMacro
Identification__NWCC__

NVHPC

TypeMacro
Identification__NVCOMPILER

Open64

TypeMacroFormatDescription
Identification__OPEN64__Contains the full version as a string
Identification__OPENCC__
Version__OPENCC__VV = Version
Version__OPENCC_MINOR__RR = Revision
Version__OPENCC_PATCHLEVEL__P.BP = Patch
B = Build

Notice that __OPENCC_PATCHLEVEL__ can be a floating-point number (e.g. 5.2 for Open64 version 4.2.5.2) so it cannot be used by the preprocessor to compare patch-levels.

Oracle Pro*C Precompiler

TypeMacro
IdentificationORA_PROC

Oracle Solaris Studio

TypeMacroFormatDescription
Identification__SUNPRO_CC compiler
Version__SUNPRO_C0xVRPV = Version
R = Revision
P = Patch

Until version 5.9
Version__SUNPRO_C0xVRRPV = Version
RR = Revision
P = Patch

From later releases
Identification__SUNPRO_CCC++ compiler
Version__SUNPRO_CCAs __SUNPRO_C
Example
Compiler versionSolaris Studio__SUNPRO_C
4.24.20x420
5.05.00x500
5.26.10x520
5.36.20x530
5.470x540
5.580x550
5.690x560
5.7100x570
5.8110x580
5.9120x590
5.1012.10x5100
5.1112.20x5110
5.1212.30x5120

The name of Oracle Solaris Studio has changed over the years (e.g. Sun Studio, Sun Workshop, Forte Developer) but we do not make this distinction in the table above.

Pacific C

TypeMacro
Identification__PACIFIC__

Palm C/C++

TypeMacroFormatDescription
Identification_PACC_VER
Version_PACC_VER0xVRRPPBBBV = Version
RR = Revision
PP = Patch
BBB = Build
Example
Palm C/C++_PACC_VER
1.0.0.130x1000000D

Orange C

TypeMacroFormatDescription
Identification__ORANGEC__VRRV = Version
RR = Revision
Version__ORANGEC_MAJOR__VV = Version
Version__ORANGEC_MINOR__RR = Revision
Version__ORANGEC_PATCHLEVEL__PP = Patch
Version__VERSION__"V.R.P.B"V = Version
R = Revision
P = Patch
B = Build

Pelles C

TypeMacroFormatDescription
Identification__POCC__
Version__POCC__VRRV = Version
RR = Revision
Example
Pelles C__POCC__
3.00300

Portland Group C/C++

TypeMacroDescription
Identification__PGI
Version__PGIC__Version
Version__PGIC_MINOR__Revision
Version__PGIC_PATCHLEVEL__Patch
Example
PGI C/C++__PGIC____PGIC_MINOR____PGIC_PATCHLEVEL__
7.0.1701
11.91190

Renesas C/C++

TypeMacroFormatDescription
Identification__RENESAS__
Identification__HITACHI__
Version__RENESAS_VERSION__0xVVRRV = Version
R = Revision
P = Patch
Version__RENESAS_VERSION__0xVVRRPP00From ?
Version__HITACHI_VERSION__0xVVRRAs above
Example
Renesas C/C++__HITACHI_VERSION____RENESAS_VERSION__
5.1C0x0501
8.00x80000x8000
1.00.000x01000000

SAS/C

TypeMacroFormatDescription
IdentificationSASC
Identification__SASC
Identification__SASC__
Version__VERSION__Until ?
Version__REVISION__Until ?
Version__SASC__VRRV = Version
RR = Revision

From ?
Example
SAS/C__SASC____VERSION____REVISION__
5.10510
6.50650

SCO OpenServer

TypeMacro
Identification_SCO_DS

Small Device C Compiler

TypeMacroFormatDescription
Identification__SDCC
IdentificationSDCCObsolete, due to be removed
Version__SDCCSDCC_V_R_PV = Version
R = Revision
P = Patch
Version__SDCC_VERSION_MAJORVMajor version number
Version__SDCC_VERSION_MINORRMinor version number
Version__SDCC_VERSION_PATCHPPatch level number
Version__SDCC_REVISIONSSVN revision number
VersionSDCCVRPObsolete, due to be removed
V = Version
R = Revision
P = Patch
Example
SDCC Version__SDCC__SDCC_VERSION_MAJOR__SDCC_VERSION_MINOR__SDCC_VERSION_PATCH__SDCC_REVISION
4.2.0 #13081SDCC_4_2_042013081

SN Compiler

TypeMacro
Identification__SNC__

Stratus VOS C

TypeMacroDescription
Identification__VOSC__
Version__VOSC__0 = K&R compiler
1 = ANSI C compiler

Symantec C++

TypeMacroFormatDescription
Identification__SC__
Version__SC__0xVVRRVV = Version
RR = Revision

TenDRA C/C++

TypeMacro
Identification__TenDRA__

Texas Instruments C/C++ Compiler

TypeMacroFormatDescription
Identification__TI_COMPILER_VERSION__
Identification_TMS320C6XAll C6000 compilers
Version__TI_COMPILER_VERSION__VVVRRRPPPVVV = Version
RRR = Revision
PPP = Patch
Example
TI C/C++__TI_COMPILER_VERSION__
4.9.14009001
7.3.17003001

THINK C

TypeMacroDescription
VersionTHINKC3Version 3.x
VersionTHINKC4Version 4.x

Tiny C

TypeMacro
Identification__TINYC__

Turbo C/C++

TypeMacroFormatDescription
Identification__TURBOC__UPDATE
Version__TURBOC__0xVVRRVV = Version
RR = Revision

This pattern does not apply to the values between 0x295 and 0x400.
Example
Turbo CTurbo C++__TURBOC__
2.010x201
1.000x295
1.010x296
2.000x297

Ultimate C/C++

TypeMacroDescription
Identification_UCC
Version_MAJOR_REV = V
_MINOR_REV = R
V = Version
R = Revision
Example
Ultimate C/C++_MAJOR_REV_MINOR_REV
2.121

USL C

TypeMacroFormatDescription
Identification__USLC__
Version__SCO_VERSION__VRRYYYYMMV = Version
RR = Revision
YYYY = Year
MM = Month
Example
USL C__SCO_VERSION__Description
3.2302199801
3.4304200805UnixWare 7.1.4 UDK C++ (CC)
4.2402200805UnixWare 7.1.4 UDK C (cc)

VBCC

TypeMacro
Identification__VBCC__

Watcom C++

TypeMacroFormatDescription
Identification__WATCOMC__
Version__WATCOMC__VVRRVV = Version
RR = Revision

Notice that Watcom C++ became Open Watcom C++ after version 11.0, and the official version numbering (but not the version macro) was restated at version 1.0.

Example
Watcom C++Open Watcom C++__WATCOMC__
10.51050
11.01100
1.01200
1.71270

Z88DK

TypeMacroFormatDescription
Identification__SCCZ80
SCCZ80
Using sccz80 compiler
Identification__SDCCUsing sdcc compiler

Zortech C++

TypeMacroFormatDescription
Identification__ZTC__
Version__ZTC__0xVRPV = Version
R = Revision
P = Patch