NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
C99 Support in TI Compilers
TI compilers support the C99 language (ISO/IEC 9899:1999) through the --c99 compiler option. This option activates C99 mode. The following table shows when C99 mode is available for each target. See Production Compiler Releases for information on release availability.
Target | Compiler release | Compiler User’s Guide |
---|---|---|
ARM | 5.2.0 | spnu151 |
ARP32 | 1.1.0 | spruh24 (no link) |
C2000 | 6.3.0 | spru514 |
C6000 | 7.5.0 | spru187 |
MSP430 | 4.3.0 | slau132 |
PRU | 2.0.0 | N/A |
Older compilers do not support C99 mode. However, some C99 features are available as extensions to C89 mode in older compilers.
The C89 extensions still exist, but are only available under the non-strict C89 modes. Under strict C89 mode, programs which leverage C99 features may behave differently or fail to compile.
Supported C99 Features[edit]
The TI compilers are not (yet) conforming C99 compilers. This means that only some of the many language constructs introduced in C99 are available.
Support for C99 language features standpoint is complete, but many runtime features are missing. One exception is that the 'extern inline' language feature is not supported in COFF ABI mode.
The following runtime features are not supported or not yet implemented. The list is organized alphabetically according to the header files in which the feature is found or associated with:
- complex.h
- Not supported by any target except C6000, supports starts in C6000 Compiler v7.4.0
- ctype.h
- isblank()
- fenv.h is not provided for C6000, C2000, or ARP32
- float.h
- The following macros are not supported on any target except for ARM
- DECIMAL_DIG
- FLT_EVAL_METHOD
- The following macros are not supported on any target except for ARM
- inttypes.h
- wcstoimax() / wcstoumax()
- math.h (C6000 / C2000 / ARP32 only)
- FP_ILOGB0 / FP_ILOGBNAN macros
- MATH_ERRNO macro
- copysign()
- float_t / double_t types
- math_errhandling()
- signbit()
- The following sets of functions from the C99 Standard do not support the 'long double' type
- 7.12.4: Trigonometric functions
- 7.12.5: Hyperbolic functions
- 7.12.6: Exponential and logarithmic functions
- 7.12.7: Power and absolute value functions
- 7.12.9: Nearest integer functions
- 7.12.10: Remainder functions
- expm1()
- ilogb() / log1p() / logb()
- scalbn() / scalbln()
- cbrt()
- hypot()
- erf() / erfc()
- lgamma() / tgamma()
- nearbyint()
- rint() / lrint() / llrint()
- lround() / llround()
- remainder() / remquo()
- nan()
- nextafter() / nexttoward()
- fdim() / fmax() / fmin() / fma()
- isgreater() / isgreaterequal() / isless() / islessequal() / islessgreater() / isunordered()
- stdarg.h
- va_copy macro
- stdio.h
- %a and %A format specifiers for hexadecimal float
- The %e specifier may produce "-0" when "0" is expected by the standard
- stdlib.h
- strtof()
- atof() / strtod() / strtold() do not support hexadecimal float strings
- atof() / strtod() / strtold() do not support "INFINITY"
- tgmath.h
- Header file not provided
- Requires complex.h to be implemented
- time.h
- strftime()
- wchar.h
- fgetws() / fputws()
- mbrlen()
- mbsrtowcs()
- wcscat()
- wcschr()
- wcscmp() / wcsncmp()
- wcscpy() / wcsncpy()
- wcsftime()
- wcsrtombs()
- wcsstr()
- wcstok()
- wcsxfrm()
- Wide character print / scan functions
- wprintf / wscanf()
- fwprintf / fwscanf()
- swprintf / swscanf()
- vfwprintf / vfwscanf()
- vswprintf / vswscanf()
- Wide character conversion functions
- wcstol()
- wcstod()
- wcstold()
- wcstof()
- wcstoll()
- wcstoul()