Datasheet
C and C++ Compilers
2-32 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
• specifying
char
,
short
,
float
, or
enum
arguments to variadic
functions such as
va_start()
.
-Wd
This option suppresses the warning message:
C2215W: Deprecated declaration foo() - give arg types
This warning is normally given when a declaration without argument
types is encountered in ANSI C mode.
In ANSI C, declarations like this are deprecated. However, it is
sometimes useful to suppress this warning when porting old code.
In C++,
void foo();
means
void foo(void);
and no warning is generated.
-We
This option suppresses the warning messages given when using an
extended initializer (see C language extensions on page 3-16) that other
C compilers are not required by the standard to accept.
-Wf
This option suppresses the message:
Inventing extern int foo()
This is an error in C++ and cannot be suppressed. It is a warning in ANSI
C and suppressing this message can be useful when compiling old-style
C in ANSI C mode.
-Wg
This option suppresses the warning given when an unguarded header file
is
#included
.
C2819W: Header file not guarded against multiple inclusion
This warning is off by default. It can be enabled with
-W+g
. An unguarded
header file is a header file not wrapped in a declaration such as:
#ifndef foo_h
#define foo_h
/* body of include file */
#endif
-Wi
This option suppresses the implicit constructor warning (C++ only).
C2887W: implicit constructor ’struct X’()
It is issued when the code requires a constructor to be invoked implicitly.
For example:
struct X { X(int); };
X x = 10; // actually means, X x = X(10);
// See the Annotated C++
// Reference Manual p.272
This warning is switched off by default. It can be enabled with
-W+i
.
-Wk
This option turns off the warning: