You copied the Doc URL to your clipboard.

Summary Table of GNU Language Extensions

GNU provides many extensions to the C and C++ languages. The ARM compiler supports these extensions in GNU mode (for example GNU C90). Some extensions are supported in a non GNU mode (for example C90). This appendix lists the language extensions that the ARM compiler supports and the modes they are supported in. The Origin column shows whether the language feature is part of any of the C90, C99, or C++ ISO Standards. The Origin column shows GCC-specific if the feature originated as a GCC extension.

Table 37. Supported GNU extensions
GNU extensionOriginModes supported
__alignof__GCC-Specific.C90, C99, C++, GNU C90, GNU C99, GNU C++.
Aggregate initializer elements for automatic variablesStandard C99, Standard C++.C99, C++, GNU C90, GNU C99, GNU C++.
Alternate keywordsGCC-specific.GNU C90, GNU C99, GNU C++.
asm keywordStandard C++.C++, GNU C90, GNU C++.
Assembler labels -C90, C99, C++, GNU C90, GNU C99, GNU C++.
Case rangesGCC-specific.GNU C90, GNU C99, GNU C++.
Cast of a unionGCC-specific.GNU C90, GNU C99.
Character escape sequenceGCC-specific.GNU C90, GNU C99, GNU C++.
Compound literalsStandard C99.C99, GNU C90, GNU C99, GNU C++.
Conditional statements with omitted operandsGCC-specific.GNU C90, GNU C99, GNU C++.
Designated initializersStandard C99.C99, GNU C90, GNU C99, GNU C++.
Dollar signs in identifiersGCC-specific.GNU C90, GNU C99, GNU C++.
Extended lvaluesStandard C++.C++, GNU C90, GNU C99, GNU C++.[a]
Function attributes-C90, C99, C++, GNU C90, GNU C99, GNU C++.
GNU built-in functions--
Inline functionsStandard C99, Standard C++.C99, C++, GNU C90, GNU C99, GNU C++.
Labels as valuesGCC-specific.GNU C90, GNU C99, GNU C++.
Pointer arithmetic on void pointers and function pointersGCC-specific.GNU C90, GNU C99.
Statement expressionsGCC-specific.GNU C90, GNU C99, GNU C++.
Unnamed embedded structures or unionsGCC-specific.GNU C90, GNU C99, GNU C++.
  __attribute__((aligned)) variable attributeGCC-specific.C90, C99, C++, GNU C90, GNU C99, GNU C++.
  __attribute__((deprecated)) variable attributeGCC-specific.C90, C99, C++, GNU C90, GNU C99, GNU C++.
  __attribute__((packed)) variable attributeGCC-specific.C90, C99, GNU C90, GNU C99, GNU C++.
  __attribute__((section("name"))) variable attributeGCC-specific.C99, GNU C90, GNU C99, GNU C++.
  __attribute__((transparent_union)) variable attributeGCC-specific.GNU C90, GNU C99.
  __attribute__((unused)) variable attributeGCC-specific.C90, C99, C++, GNU C90, GNU C99, GNU C++.
  __attribute__((used)) variable attributeGCC-specific.C90, C99, GNU C90, GNU C99.
  __attribute__((weak)) variable attributeGCC-specific.C90, C99, C++, GNU C90, GNU C99, GNU C++.
Variadic macrosStandard C99.C90, C99, C++, GNU C90, GNU C99, GNU C++ [b].
Zero-length arraysGCC-specific.GNU C90, GNU C99.

[a] Only accepted for certain values of --gnu_version.

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


Was this page helpful? Yes No