SPRUIG8J January 2018 – March 2024
The compiler maintains and recognizes the predefined macro names listed in Table 12-39.
Macro Name | Description |
---|---|
__big_endian__ | Defined to 1 if big-endian mode is selected (the --endian=big option is used); otherwise, it is undefined. |
__C7000__ | Defined to 1 for all C7000 subtargets. |
__C7100__ | Defined to 1 for the C7100 subtarget. |
__C7120__ | Defined to 1 for the C7120 subtarget. |
__C7504__ | Defined to 1 for the C7504 subtarget. |
__C7X_VEC_SIZE_BITS__ | Defined to 512 or 256, depending on the --silicon_version/-mv option. |
__C7X_VEC_SIZE_BYTES__ | Defined to 64 or 32, depending on the --silicon_version/-mv option. |
__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 to 1 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, which is long. |
__SIZE_T_TYPE__ | Defined to the type of size_t, which is unsigned long. |
__STDC__(1) | Defined to 1 to indicate that compiler conforms to ISO C Standard. See Section 5.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_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. |
__TIME__(1) | Expands to the compilation time in the form "hh:mm:ss" |
__WCHAR_T_TYPE__ | Defined to the type of wchar_t, which is unsigned int. |
You can use the names listed in Table 12-39 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");