SPRUI04F july 2015 – april 2023
The compiler maintains and recognizes the predefined macro names listed in Table 3-29.
Macro Name | Description |
---|---|
_BIG_ENDIAN | Defined if big-endian mode is selected (the --big_endian option is used); otherwise, it is undefined. |
__DATE__(1) | Expands to the compilation date in the form mmm dd yyyy |
__FILE__(1) | Expands to the current source filename |
_INLINE | Expands to 1 if optimization is used (--opt_level or -O option); undefined otherwise. |
__LINE__(1) | Expands to the current line number |
_LITTLE_ENDIAN | Defined if little-endian mode is selected (the --big_endian option is not used); otherwise, it is undefined. |
__PTRDIFF_T_TYPE__ | Defined to the type of ptrdiff_t. |
__SIZE_T_TYPE__ | Defined to the type of size_t. |
__STDC__(1) | Defined to 1 to indicate that compiler conforms to ISO C Standard. See Section 7.1 for exceptions to ISO C conformance. |
__STDC_VERSION__ | C standard macro. |
__STDC_HOSTED__ | C standard macro. Always defined to 1. |
__STDC_NO_THREADS__ | C standard macro. Always defined to 1. |
__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_C99_COMPLEX_ENABLED__ | Defined to 1 if complex data types are enabled. This is always the case, though math operations are available only if complex.h is included. |
__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 to 1. |
__TI_GNU_ATTRIBUTE_SUPPORT__ | Defined to 1 if GCC extensions are enabled (which is the default) |
__TI_STRICT_ANSI_MODE__ | Defined to 1 if strict ANSI/ISO mode is enabled (the --strict_ansi option is used); otherwise, it is defined as 0. |
__TI_STRICT_FP_MODE__ | Defined to 1 if --fp_mode=strict is used (default); otherwise, it is defined as 0. |
__TI_WCHAR_T_BITS__ | Defined to the type of wchar_t. |
__TIME__(1) | Expands to the compilation time in the form "hh:mm:ss" |
_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 |
__WCHAR_T_TYPE__ | Defined to the type of wchar_t. |
You can use the names listed in Table 3-29 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");