| |||
| Home > The ARM Compilers > Command syntax > Setting the source language | |||
This section describes options that have a major effect on the source language accepted by the compiler. The compiler modes are described in detail in Source language modes. See also, Controlling code generation.
The following options can be used to specify the source language that the compiler is to accept, and how strictly it enforces the standards or conventions of that language. If no source language option is specified, the C compilers attempt to compile ANSI C, and the C++ compilers attempt to compile C++ that conforms to the Draft Standard.
-ansiCompiles ANSI standard C. This is the default for armcc and tcc.
-ansicCompiles
ANSI standard C. This option is synonymous with the -ansi option.
-cfrontThis option applies to the C++ compilers only.
The compiler alters its behavior so that it is more likely to accept C++ programs that Cfront accepts.
-fussyIs
extra strict about enforcing conformance to the ANSI C standard,
Draft C++ standard, or PCC conventions. For example, in C++ mode
the following code gives an error when compiled with -fussy and
a warning without:
static struct T {int i; };
Because no object is declared, the static is spurious. In a strict reading of the C++ Draft Standard, it is illegal.
-pccCompiles
(BSD 4.2) Portable C compiler C. This dialect is based on the original
Kernighan and Ritchie definition of C, and is the one used to build
UNIX systems. The -pcc option alters the language
accepted by the compiler, however the built-in ANSI C headers are
still used. See also, the -zc option in Controlling code
generation.
The -pcc option alters the language accepted
by the compilers in the following ways:
char is signed
sizeof is signed
an approximation of early UNIX-style C preprocessing is used.
-pedanticThis
is a synonym for -fussy.
-strictThis
is a synonym for -fussy.