07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the <strong>Compiler</strong> on the Comm<strong>and</strong> Line<br />

TABLE 3-6: WARNING/ERROR OPTIONS NOT IMPLIED BY -WALL<br />

Option Definition<br />

-W Print extra warning messages <strong>for</strong> these events:<br />

• A nonvolatile automatic variable might be changed by a<br />

call to longjmp. These warnings are possible only in<br />

optimizing compilation. The compiler sees only the calls<br />

to setjmp. It cannot know where longjmp will be called;<br />

in fact, a signal h<strong>and</strong>ler could call it at any point in the<br />

code. As a result, a warning may be generated even<br />

when there is in fact no problem, because longjmp<br />

cannot in fact be called at the place that would cause a<br />

problem.<br />

• A function could exit both via return value; <strong>and</strong><br />

return;. Completing the function body without passing<br />

any return statement is treated as return;.<br />

• An expression-statement or the left-h<strong>and</strong> side of a<br />

comma expression contains no side effects. To suppress<br />

the warning, cast the unused expression to void. For<br />

example, an expression such as x[i,j] will cause a<br />

warning, but x[(void)i,j] will not.<br />

• An unsigned value is compared against zero with < or

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!