# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 89
- 90
- 91
- 92
- 93
…
- 365
- 366

Compiler Command-Line Driver
 2012-2013 Microchip Technology Inc. DS50002071C-page 91
TABLE 5-9: WARNING/ERROR OPTIONS NOT IMPLIED BY -WALL
Option Definition
-W Print extra warning messages for these events:
 A nonvolatile automatic variable might be changed by a
call to longjmp. These warnings are possible only in
optimizing compilation. The compiler sees only the calls
to setjmp. It cannot know where longjmp will be called;
in fact, a signal handler could call it at any point in the
code. As a result, a warning may be generated even
when there is in fact no problem, because longjmp
cannot in fact be called at the place that would cause a
problem.
 A function could exit both via return value; and
return;. Completing the function body without passing
any return statement is treated as return;.
 An expression-statement or the left-hand side of a
comma expression contains no side effects. To suppress
the warning, cast the unused expression to void. For
example, an expression such as x[i,j] will cause a
warning, but x[(void)i,j] will not.
 An unsigned value is compared against zero with < or <=.
 A comparison like x<=y<=z appears; this is equivalent to
(x<=y ? 1 : 0) <= z, which is a different interpretation
from that of ordinary mathematical notation.
 Storage-class specifiers like static are not the first
things in a declaration. According to the C Standard, this
usage is obsolescent.
 If -Wall or -Wunused is also specified, warn about
unused arguments.
 A comparison between signed and unsigned values could
produce an incorrect result when the signed value is
converted to unsigned. (But dont warn if
-Wno-sign-compare is also specified.)
 An aggregate has a partly bracketed initializer. For
example, the following code would evoke such a warning,
because braces are missing around the initializer for x.h:
struct s { int f, g; };
struct t { struct s h; int i; };
struct t x = { 1, 2, 3 };
 An aggregate has an initializer that does not initialize all
members. For example, the following code would cause
such a warning, because x.h would be implicitly
initialized to zero:
struct s { int f, g, h; };
struct s x = { 3, 4 };
-Waggregate-return Warn if any functions that return structures or unions are
defined or called.
-Wbad-function-cast Warn whenever a function call is cast to a non-matching type.
For example, warn if int foof() is cast to anything *.
-Wcast-align Warn whenever a pointer is cast, such that the required
alignment of the target is increased. For example, warn if a
char * is cast to an int * .
-Wcast-qual Warn whenever a pointer is cast, so as to remove a type
qualifier from the target type. For example, warn if a
const char * is cast to an ordinary char *.

- 1
- 2
…
- 89
- 90
- 91
- 92
- 93
…
- 365
- 366