Most compilers defines macros to indicate the compiler and its version. These are useful to avoid bugs in certain compiler versions, or to check for the existance of certain features.
Table of Content - Compilers
-
Table of Content - Compilers
Borland Turbo C
Borland C++
Comeau C++
Compaq C/C++
Cray C
Cygwin
Diab C/C++
Digital Mars
DJGPP
EKOPath
EDG C++ Front End
GNU C/C++
Green Hill C/C++
HP ANSI C
HP aCC
IBM XL C/C++
IBM z/OS C/C++
IAR C/C++
Intel C/C++
KAI C++
Keil CARM
Keil C166
Keil C51
LCC
LLVM
MetaWare High C/C++
Metrowerks CodeWarrior
MinGW
MIPSpro
MPW C++
Microsoft Visual C++
Microtec C/C++
Norcroft C
Pacific C
Palm C/C++
Pelles C
Portland Group C/C++
RealView C
SAS/C
SCO OpenServer
Small Device C Compiler
Sun Studio
Systems/C and Systems/C++
TenDRA C/C++
Tiny C
Ultimate C/C++
USL C
Watcom C++
Borland Turbo C
Type | Macro | Format |
---|---|---|
Identification | __TURBOC__ | . |
Version | __TURBOC__ | ? |
Example
Turbo C | __TURBOC__ |
---|---|
2.0 | 397 |
3.0 | 661 |
Official site | Wikipedia |
Borland C++
Type | Macro | Format |
---|---|---|
Identification | __BORLANDC__ | . |
Version | __BORLANDC__ | ? |
Example
Borland C++ | C++ Builder | __BORLANDC__ |
---|---|---|
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 |
Official site | Google Directory | Wikipedia |
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 |