4.2.1 Macro Names

The following shows supported macro names.

Table 4.22

Predefined Macros of Compiler

No.

Option

Predefined Macro

1

-

__DATE__

Date of translating source file (character string constant in the form of "Mmm dd yyyy".) Here, the name of the month is the same as that created by the asctime function stipulated by ANSI standards (3 alphabetic characters with only the first character is capital letter) (The first character of dd is blank if its value is less than 10).

2

-

__FILE__

Name of assumed source file (character string constant).

3

-

__LINE__

Line number of source line at that point (decimal).

4

-

__STDC__

1

5

lang=c99

__STDC_HOSTED__

1

6

lang=c*1

lang=c99

__STDC_VERSION__

199409L (lang = c*1)

199901L (lang = c99)

7

lang=cpp*2

lang=ecpp

__cplusplus

1

8

-

__TIME__

Translation time of source file (character string constant having format "hh:mm:ss").

9

isa=rxv1

isa=rxv2

#define __RXV1

#define __RXV2

1

1

10

endian=big

endian=little

#define __BIG

#define __LIT

1

1

11

dbl_size=4

dbl_size=8

#define __DBL4

#define __DBL8

1

1

12

int_to_short

#define __ INT_SHORT

1

13

signed_char

unsigned_char

#define __SCHAR

#define __UCHAR

1

1

14

signed_bitfield

unsigned_bitfield

#define __SBIT

#define __UBIT

1

1

15

round=zero

round=nearest

#define __ROZ

#define __RON

1

1

16

denormalize=off

denormalize=on

#define __DOFF

#define __DON

1

1

17

bit_order=left

bit_order=right

#define __BITLEFT

#define __BITRIGHT

1

1

18

auto_enum

#define __AUTO_ENUM

1

19

library=function

library=intrinsic

#define __FUNCTION_LIB

#define __INTRINSIC_LIB

1

1

20

fpu

#define __FPU

1

21

-

#define __RENESAS__ *3

1

22

-

#define __RENESAS_VERSION__ *3

0xXXYYZZ00 *4

23

-

#define __RX *3

1

24

pic

#define __PIC

1

25

pid

#define __PID

1

26

cpu=rx600

cpu=rx200

#define __RX600

#define __RX200

1

1

27

-

#define __CCRX__ *3

1

Notes 1.

Includes cases where a file with the .c extension is compiled without specifying the -lang option.

Notes 2.

Includes cases where a file with the .cpp, .cp, or .cc extension is compiled without specifying the -lang option.

Notes 3.

Always defined regardless of the option.

Notes 4.

When the Compiler version is VXX.YY.ZZ, the value of __RENESAS_VERSION__ is 0xXXYYZZ00.
Example
For V2.06.00: #define __RENESAS_VERSION__ 0x02060000