14.1 Supported GNU extensions

Describes ARM compiler support for GNU extensions to the C and C++ languages.

Table 14-1 Supported GNU extensions

GNU extension Origin Modes supported
10.4 __alignof__ GCC-Specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
Aggregate initializer elements for automatic variables Standard C99, Standard C++. C99, C++, GNU C90, GNU C99, GNU C++.
Alternate keywords GCC-specific. GNU C90, GNU C99, GNU C++.
asm keyword Standard C++. C++, GNU C90, GNU C++.
Assembler labels - C90, C99, C++, GNU C90, GNU C99, GNU C++.
Case ranges GCC-specific. GNU C90, GNU C99, GNU C++.
Cast of a union GCC-specific. GNU C90, GNU C99.
Character escape sequence GCC-specific. GNU C90, GNU C99, GNU C++.
Compound literals Standard C99. C99, GNU C90, GNU C99, GNU C++.
Conditional statements with omitted operands GCC-specific. GNU C90, GNU C99, GNU C++.
Designated initializers Standard C99. C99, GNU C90, GNU C99, GNU C++.
Dollar signs in identifiers GCC-specific. GNU C90, GNU C99, GNU C++.
Extended lvalues a Standard C++. C++, GNU C90, GNU C99, GNU C++.
10.30 Function attributes - C90, C99, C++, GNU C90, GNU C99, GNU C++.
10.154 GNU built-in functions - -
Inline functions Standard C99, Standard C++. C99, C++, GNU C90, GNU C99, GNU C++.
Labels as values GCC-specific. GNU C90, GNU C99, GNU C++.
Pointer arithmetic on void pointers and function pointers GCC-specific. GNU C90, GNU C99.
Statement expressions GCC-specific. GNU C90, GNU C99, GNU C++.
Unnamed embedded structures or unions GCC-specific. GNU C90, GNU C99, GNU C++.
10.62 __attribute__((aligned)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
10.63 __attribute__((deprecated)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
10.65 __attribute__((packed)) variable attribute GCC-specific. C90, C99, GNU C90, GNU C99, GNU C++.
10.66 __attribute__((section("name"))) variable attribute GCC-specific. C99, GNU C90, GNU C99, GNU C++.
10.67 __attribute__((transparent_union)) variable attribute GCC-specific. GNU C90, GNU C99.
10.68 __attribute__((unused)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
10.69 __attribute__((used)) variable attribute GCC-specific. C90, C99, GNU C90, GNU C99.
10.71 __attribute__((weak)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
Variadic macros Standard C99. C90, C99, C++, GNU C90, GNU C99, GNU C++ . b
Zero-length arrays GCC-specific. GNU C90, GNU C99.
Related information
Which GNU language extensions are supported by the ARM Compiler?
a

Only accepted for certain values of --gnu_version.

b

If --gnu is specified (GNU modes), GNU-specific syntax applies.

Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.