Datasheet
C and C++ Compilers
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 2-37
2.3.12 Controlling error messages
The compiler issues errors to indicate serious problems in the code it is attempting to
compile. The compiler options described below enable you to:
• turn off specific recoverable errors
• downgrade specific errors to warnings.
Caution
These options force the compiler to accept C and C++ source that normally produces
errors. If you use any of these options to ignore error messages, it means that your
source code does not conform to the appropriate C or C++ standard.
These options can be useful during development, or when importing source code from
other environments. However, they might permit code to be produced that does not
function correctly. It is generally better to correct the source than to use options to
switch off error messages.
The general form of the
-E
compiler option is:
-E[options][+][options]
where
options
is a set of one or more of the letters
a
,
c
,
f
,
i
,
l
,
p
, or
z
as described below.
If the
+
character is included in the characters following the
-E
, the error messages
corresponding to any following letters are enabled rather than suppressed.
Note
The
-E
option on its own without any options is the preprocessor switch. See Setting
preprocessor options on page 2-15.
You can specify multiple options. For example:
-Eac
turns off the error messages specified by
a
and
c
.
The following options are on by default:
-Ea
For C++ only, this option downgrades access control errors to warnings.
For example:
class A { void f() {}; }; // private member
A a;
void g() { a.f(); } // erroneous access
C3032E: ’A::f’ is a non-public member