SPRU514Z July 2001 – October 2023 SM320F28335-EP
The compiler maintains and recognizes the predefined macro names listed in Table 2-29.
Macro Name | Description |
---|---|
__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__ | Always defined to 1. |
__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 6.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_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__ | Defined to 1 if --abi=eabi is used. |
__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. |
__TIME__(1) | Expands to the compilation time in the form "hh:mm:ss" |
__TMS320C2000__ | Defined for C28x processor |
__TMS320C28XX__ | Defined if target is C28x |
__TMS320C28XX_CLA__ | Defined to 1 if any --cla_support option was used and the source file is a .cla file. |
__TMS320C28XX_CLA0__ | Defined to 1 if the --cla_support=cla0 option was used and the source file is a .cla file. |
__TMS320C28XX_CLA1__ | Defined to 1 if the --cla_support=cla1 option was used and the source file is a .cla file. |
__TMS320C28XX_CLA2__ | Defined to 1 if the --cla_support=cla2 option was used and the source file is a .cla file. |
__TMS320C28XX_FPU32__ | Defined to 1 if either the --float_support=fpu32 or fpu64 option was used. |
__TMS320C28XX_FPU64__ | Defined to 1 if the --float_support=fpu64 option was used. |
__TMS320C28XX_IDIV__ | Defined to 1 if the --idiv_support=idiv0 option was used. |
__TMS320C28XX_TMU__ | Defined to 1 if the --tmu_support option was used with any setting. |
__TMS320C28XX_TMU0__ | Defined to 1 if the --tmu_support option was used with any setting. |
__TMS320C28XX_TMU1__ | Defined to 1 if the --tmu_support=tmu1 option was used. |
__TMS320C28XX_VCU0__ | Defined to 1 if the --vcu_support option was used with any setting. |
__TMS320C28XX_VCU2__ | Defined to 1 if the --vcu_support=vcu2 option was used. |
__TMS320C28XX_VCRC__ | Defined to 1 if the --vcu_support=vcrc option was used. |
__WCHAR_T_TYPE__ | Defined to the type of wchar_t. |
You can use the names listed in Table 2-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");