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
9.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++.
9.28 Function attributes - C90, C99, C++, GNU C90, GNU C99, GNU C++.
9.151 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++.
9.55 __attribute__((aligned)) type attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
9.61 __attribute__((aligned)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
9.62 __attribute__((deprecated)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
9.56 __attribute__((packed)) type attribute GCC-specific. GNU C90, GNU C99, GNU C++.
9.64 __attribute__((packed)) variable attribute GCC-specific. C90, C99, GNU C90, GNU C99, GNU C++.
9.65 __attribute__((section("name"))) variable attribute GCC-specific. C99, GNU C90, GNU C99, GNU C++.
9.57 __attribute__((transparent_union)) type attribute GCC-specific. GNU C90, GNU C99.
9.66 __attribute__((unused)) variable attribute GCC-specific. C90, C99, C++, GNU C90, GNU C99, GNU C++.
9.67 __attribute__((used)) variable attribute GCC-specific. C90, C99, GNU C90, GNU C99.
9.69 __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
chr1359124921873.xml
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 DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.