4.2.2 Macro

All the following macro names are supported.

 

Table 4.10

List of Supported Macros

Macro Name

Definition

__LINE__

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

__FILE__

Name of source file (character string constant).

__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).Note2

__TIME__

Translation time of source file (character string constant having format "hh:mm:ss" similar to the time created by the asctime function).Note2

__STDC__

Decimal constant 1 (defined when the -strict_std option is specified).Note1

__RENESAS__

Decimal constant 1.

__RENESAS_VERSION__

If the version is V.XX.YY.ZZ, this will be 0xXXYYZZ00.

Example) V.1.00.00 -> -D__RENESAS_VERSION__=0x01000000

__RL78__

Decimal constant 1.

__RL78_S1__

Decimal constant 1 (defined when S1 is specified by the -cpu option).

__RL78_S2__

Decimal constant 1 (defined when S2 is specified by the -cpu option).

__RL78_S3__

Decimal constant 1 (defined when S3 is specified by the -cpu option).

__RL78_SMALL__

Decimal constant 1 (defined when small is specified by the -memory_model option or when S1 is specified by the -cpu option while the -memory_model option is not specified).

__RL78_MEDIUM__

Decimal constant 1 (defined when medium is specified by the -memory_model option or when S2 or S3 is specified by the -cpu option while the
-memory_model option is not specified).

__CCRL__

Decimal constant 1.

__CCRL

Decimal constant 1.

__DBL4

Decimal constant 1 (defined when 4 is specified by the -dbl_size option).

__DBL8

Decimal constant 1 (defined when 8 is specified by the -dbl_size option).

__SCHAR

Decimal constant 1 (defined when the -signed_char option is specified).

__UCHAR

Decimal constant 1 (defined when the -signed_char option is not specified).

__SBIT

Decimal constant 1 (defined when the -signed_bitfield option is specified).

__UBIT

Decimal constant 1 (defined when the -signed_bitfield option is not specified).

__FAR_ROM__

Decimal constant 1 (defined when the -far_rom option is specified).

__CNV_CA78K0R__

Decimal constant 1 (defined when ca78k0r is specified by the -convert_cc option).

__CNV_NC30__

Decimal constant 1 (defined when nc30 is specified by the -convert_cc option).

__CNV_IAR__

Decimal constant 1 (defined when iar is specified by the -convert_cc option)

__BASE_FILE__

C source file name (character string constant).

Unlike __FILE__, the C source file name is returned even when used in an include file.

__STDC_VERSION__

Decimal constant 199409L (defined when the -lang=c and -strict_std options are specified).Note1

Decimal constant 199901L (defined when the -lang=c99 option is specified).

__STDC_HOSTED__

Decimal constant 0 (defined when the -lang=c99 option is specified).

__STDC_IEC_559__

Decimal constant 1 (defined when the -lang=c99 option is specified).

Note 1.

For the processing to be performed when the -strict_std option is specified, see "-strict_std [V1.06 or later] / -ansi [V1.05 or earlier]".

Note 2.

The date and time of translation can be obtained in any case; the __DATE__ and __TIME__ macro values are always defined.