Datasheet
ARM Compiler Reference
3-16 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
3.2 Language extensions
This section describes the language extensions supported by the ARM compilers.
3.2.1 C language extensions
The compilers support the ANSI C language extensions described below and in C and
C++ language extensions. The extensions are not available if the compiler is restricted
to compiling strict ANSI C, for example, by specifying the
-strict
compiler option.
// comments
The character sequence
//
starts a comment. As in C++, the comment is terminated by
the next newline character.
Note
Comment removal takes place after line continuation, so:
// this is a - \
single comment
The characters of a comment are examined only to find the comment terminator,
therefore:
•
//
has no special significance inside a comment introduced by
/*
•
/*
has no special significance inside a comment introduced by
//
constant expressions
Extended constant expressions, such as the following, are allowed in initializers:
int i;
int j = (int)&i; /* but not allowed by ANSI/ISO */
3.2.2 C and C++ language extensions
This section describes the extensions to both the ANSI C language, and the ISO/IEC
C++ language that are accepted by the compilers. See C language extensions for those
extensions that apply only to C. None of these extensions are available if the compiler
is restricted to compiling strict ANSI C or strict ISO/IEC C++. This is the case, for
example, when the
-strict
compiler option is specified.