3.3. GNU extensions to the ARM compiler

This section describes the GNU compiler extensions that are supported by the ARM compiler. These extensions are supported when you run the compiler with the --gnu option. However, some extensions are also supported when you run the compiler without this option. These compilation modes are referred to in this document as:

ARM mode

The default mode, that is, compilations without the --gnu option.

GNU mode

Compilations with the --gnu option.

Table 3.2 lists the GNU extensions that are supported by the ARM compiler, and the mode and language in which they are supported.

Table 3.2. Supported GNU extensions

GNU extensionSupported modeSupported languageNotes
AlignmentGNU, ARMC, C++-
Alternate keywordsGNUC, C++-
Assembler labelsGNUC, C++-
Attribute syntaxGNU, ARMC, C++

The transparent_union attribute is only supported in GNU mode.

Builtin functionsGNU, ARMC, C++-
C++ commentsGNU, ARMC, C++-
Case rangesGNUC, C++-
Cast of a unionGNUC only-
Character escapesGNUC, C++-
Compound literalsGNUC only-
ConditionalsGNUC, C++-
Designated initsGNUC, C++-
Dollar signsGNUC, C++-
Function attributesGNU, ARMC, C++-
Function namesGNU, ARMC only-
Function prototypesGNUC only-
Hex floatsGNUC, C++-
Incomplete enumsGNU, ARMC, C++-
InitializersGNUC, C++-
InlineGNU, ARMC, C++-
Local labelsGNUC, C++-
Long longGNU, ARMC, C++-
LvaluesGNUC, C++-
Pointer arithmeticGNUC, C++-
Return and frame addressesGNUC, C++-
Statement expressionsGNUC, C++-
Subscripting structGNU, ARMC, C++-
Type attributesGNU, ARMC, C++

The transparent_union attribute is only supported in GNU mode.

typeofGNUC, C++-
Unnamed fieldsGNUC, C++-
Variable attributesGNU, ARMC, C++

The transparent_union attribute is only supported in GNU mode.

Variadic macrosGNU, ARMC, C++-
Zero length arraysGNUC, C++-

Note

For more details on the use of these extensions, see the GNU compiler documentation. You can access this documentation online at http://gcc.gnu.org.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0205G
Non-Confidential