SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Most of the GCC language extensions are available in the TI compiler when compiling in relaxed ANSI mode (--relaxed_ansi).
The extensions that the TI compiler supports are listed in Table 5-5, which is based on the list of extensions found at the GNU web site. The shaded rows describe extensions that are not supported.
| Extensions | Descriptions |
|---|---|
| Statement expressions | Putting statements and declarations inside expressions (useful for creating smart 'safe' macros) |
| Local labels | Labels local to a statement expression |
| Labels as values | Pointers to labels and computed gotos |
| Nested functions | As in Algol and Pascal, lexical scoping of functions |
| Constructing calls | Dispatching a call to another function |
| Naming types(1) | Giving a name to the type of an expression |
| typeof operator | typeof referring to the type of an expression |
| Generalized lvalues | Using question mark (?) and comma (,) and casts in lvalues |
| Conditionals | Omitting the middle operand of a ?: expression |
| long long | Double long word integers and long long int type |
| Hex floats | Hexadecimal floating-point constants |
| Complex | Data types for complex numbers |
| Zero length | Zero-length arrays |
| Variadic macros | Macros with a variable number of arguments |
| Variable length | Arrays whose length is computed at run time |
| Empty structures | Structures with no members |
| Subscripting | Any array can be subscripted, even if it is not an lvalue. |
| Escaped newlines | Slightly looser rules for escaped newlines |
| Multi-line strings(1) | String literals with embedded newlines |
| Pointer arithmetic | Arithmetic on void pointers and function pointers |
| Initializers | Non-constant initializers |
| Compound literals | Compound literals give structures, unions, or arrays as values |
| Designated initializers | Labeling elements of initializers |
| Cast to union | Casting to union type from any member of the union |
| Case ranges | 'Case 1 ... 9' and such |
| Mixed declarations | Mixing declarations and code |
| Function attributes | Declaring that functions have no side effects, or that they can never return |
| Attribute syntax | Formal syntax for attributes |
| Function prototypes | Prototype declarations and old-style definitions |
| C++ comments | C++ comments are recognized. |
| Dollar signs | A dollar sign is allowed in identifiers. |
| Character escapes | The character ESC is represented as \e |
| Variable attributes | Specifying the attributes of variables |
| Type attributes | Specifying the attributes of types |
| Alignment | Inquiring about the alignment of a type or variable |
| Inline | Defining inline functions (as fast as macros) |
| Assembly labels | Specifying the assembler name to use for a C symbol |
| Extended asm | Assembler instructions with C operands |
| Constraints | Constraints for asm operands |
| Wrapper headers | Wrapper header files can include another version of the header file using #include_next |
| Alternate keywords | Header files can use __const__, __asm__, etc |
| Explicit reg vars | Defining variables residing in specified registers |
| Incomplete enum types | Define an enum tag without specifying its possible values |
| Function names | Printable strings which are the name of the current function |
| Return address | Getting the return or frame address of a function (limited support) |
| Other built-ins | Other built-in functions (see Section 5.17.6) |
| Vector extensions | Using vector instructions through built-in functions |
| Target built-ins | Built-in functions specific to particular targets |
| Pragmas | Pragmas accepted by GCC |
| Unnamed fields | Unnamed struct/union fields within structs/unions |
| Thread-local | Per-thread variables |
| Binary constants | Binary constants using the '0b' prefix. |