macros to indicate the compiler and its version

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

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

Official site

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

Official site

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值