The compiler maintains and recognizes the predefined macro names listed in Table 3-33.
| Macro Name | Description |
|---|---|
| _ _DATE_ _(1) | Expands to the compilation date in the form mmm dd yyyy |
| _ _FILE_ _(1) | Expands to the current source filename |
| _ _LINE_ _(1) | Expands to the current line number |
| _ _STDC_ _(1) | Defined to indicate that compiler conforms to ISO C Standard. See Section 7.1 for exceptions to ISO C conformance. |
| _ _STDC_VERSION_ _ | C standard macro |
| _ _TI_32BIT_LONG_ _ | Defined to 1 if the type "long" is 32 bits wide; otherwise, it is undefined. |
| _ _TI_40BIT_LONG_ _ | Defined to 1 if _ _TI_32BIT_LONG_ _ is not defined; otherwise, it is undefined. |
| _ _TI_COMPILER_VERSION_ _ | Defined to a 7-9 digit integer, depending on if X has 1, 2, or 3 digits. The number does not contain a decimal. For example, version 3.2.1 is represented as 3002001. The leading zeros are dropped to prevent the number being interpreted as an octal. |
| _ _TI_EABI_ _ | Always defined |
| _ _TI_GNU_ATTRIBUTE_SUPPORT_ _ | Defined if GCC extensions are enabled (which is the default) |
| _ _TI_STRICT_ANSI_MODE__ | Defined if strict ANSI/ISO mode is enabled (the --strict_ansi option is used); otherwise, it is undefined. |
| _ _TI_STRICT_FP_MODE_ _ | Defined to 1 if --fp_mode=strict is used (or implied); otherwise, it is undefined. |
| _ _TI_WCHAR_T_BITS_ _ | Set to the type of wchar_t. |
| _ _TIME_ _(1) | Expands to the compilation time in the form "hh:mm:ss" |
| _ _WCHAR_T_TYPE_ _ | Set to the type of wchar_t. |
| _BIG_ENDIAN | Defined if big-endian mode is selected (the --big_endian option is used); otherwise, it is undefined. |
| _INLINE | Expands to 1 if optimization is used (--opt_level or -O option); undefined otherwise. |
| _LITTLE_ENDIAN | Defined if little-endian mode is selected (the --big_endian option is not used); otherwise, it is undefined. |
| _TMS320C6X | Always defined |
| _TMS320C6400_PLUS | Defined if target is C6400+, C6740, or C6600 |
| _TMS320C6740 | Defined if target is C6740 or C6600 |
| _TMS320C6600 | Defined if target is C6600 |
| _ _TMS320C6X_ _ | Always defined for use as alternate name for _TMS320C6x |
You can use the names listed in Table 3-33 in the same manner as any other defined name. For example,
printf ( "%s %s" , __TIME__ , __DATE__);
translates to a line such as:
printf ("%s %s" , "13:58:17", "Jan 14 1997");