NOTICE: The Processors Wiki will End-of-Life in December of 2020. 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 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[edit]

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[edit]

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 --
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article C99 Extensions Supported in C89 Mode in TI Compilers (06Q1-13Q2) here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity