Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2)

From Texas Instruments Wiki
Jump to: navigation, search

In C89 mode, the compiler supports selected C99 features as language extensions.

This page applies to compiler releases starting with the following versions.

Target Initial
Release
Compiler
User’s Guide
ARM 4.4.0 spnu151
C2000 5.0.0 spru514
C5500 4.0.0 spru281
C6000 6.1.0 spru187
MSP430 2.0.0 slau132

For information on the C99 mode supported by the latest releases of the TI compiler, see C99 Support in TI Compilers.

For information on the C99 language extensions supported in C89 mode by the latest releases of the TI compiler, see C99 Extensions Supported in C89 Mode in TI Compilers.

In older compiler releases, only a limited set of C99 features were provided (inline, ...)

Enabling C99 Language Extensions

The supported C99 features are only available depending on the language mode.

In relaxed ANSI mode or in GCC mode, all of the supported C99 extensions are enabled. (In compilers released prior to late-2010, Relaxed ANSI mode is not sufficient; the --gcc option must be used.)

By default, the compiler is in C89 mode which is neither relaxed nor strict ("default mode"), and most of the supported C99 features are supported.

In strict ANSI mode, most C99 features are disabled.

Language Features

This table lists the supported C99 language features and shows when they are enabled. These C99 features are linked to the language conformance mode in use.

Feature Relaxed Default Strict Comments
Restricted pointers y n n restrict keyword
Flexible array member y n n Support GCC [0], not C99 []
long long type y y y --
Universal character names y n n \u and \U
Compound literals y n n --
Non-constant initializers y n n --
Designated initializers y n n --
C++ style // comments y y n --
inttypes.h y y y --
stdint.h y y y --
Mixed declarations and code y y n --
Variadic macros y n n --
Additional math functions in math.h y y y cosf, acosh, exp2 et al. for ARM, C6x and C55x only
inline keyword y y n --
snprintf family of functions in stdio.h y y y --
stdbool.h y y y --
_Pragma preprocessor operator y y y --
__func__ predefined identifier y n n --
Conversion of array to pointer not limited to Lvalues y n n --