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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16-Bit C <strong>Compiler</strong> User’s Guide<br />

suggest hiding #directive from traditional C with an indented #<br />

The specified directive is not traditional C <strong>and</strong> may be ‘hidden’ by indenting the #.<br />

A directive is ignored unless its # is in column 1.<br />

suggest not using #elif in traditional C<br />

#elif should not be used in traditional K&R C.<br />

suggest parentheses around assignment used as truth value<br />

When assignments are used as truth values, they should be surrounded by<br />

parentheses, to make the intention clear to readers of the source program.<br />

suggest parentheses around + or - inside shift<br />

suggest parentheses around && within ||<br />

suggest parentheses around arithmetic in oper<strong>and</strong> of |<br />

suggest parentheses around comparison in oper<strong>and</strong> of |<br />

suggest parentheses around arithmetic in oper<strong>and</strong> of ^<br />

suggest parentheses around comparison in oper<strong>and</strong> of ^<br />

suggest parentheses around + or - in oper<strong>and</strong> of &<br />

suggest parentheses around comparison in oper<strong>and</strong> of &<br />

While operator precedence is well defined in C, sometimes a reader of an expression<br />

might be required to expend a few additional microseconds in comprehending the<br />

evaluation order of oper<strong>and</strong>s in an expression if the reader has to rely solely upon the<br />

precedence rules, without the aid of explicit parentheses. A case in point is the use of<br />

the ‘+’ or ‘-’ operator inside a shift. Many readers will be spared unnecessary ef<strong>for</strong>t if<br />

parentheses are use to clearly express the intent of the programmer, even though the<br />

intent is unambiguous to the programmer <strong>and</strong> to the compiler.<br />

T<br />

‘identifier’ takes only zero or two arguments<br />

Expecting zero or two arguments only.<br />

the meaning of ‘\a’ is different in traditional C<br />

When the -wtraditional option is used, the escape sequence ‘\a’ is not recognized<br />

as a meta-sequence: its value is just ‘a’. In non-traditional compilation, ‘\a’ represents<br />

the ASCII BEL character.<br />

the meaning of ‘\x’ is different in traditional C<br />

When the -wtraditional option is used, the escape sequence ‘\x’ is not recognized<br />

as a meta-sequence: its value is just ‘x’. In non-traditional compilation, ‘\x’ introduces<br />

a hexadecimal escape sequence.<br />

third argument of ‘identifier’ should probably be ‘char **’<br />

Expecting third argument of specified identifier to be of type ‘char **’.<br />

this function may return with or without a value<br />

All exit paths from non-void function should return an appropriate value. The compiler<br />

detected a case where a non-void function terminates, sometimes with <strong>and</strong> sometimes<br />

without an explicit return value. There<strong>for</strong>e, the return value might be unpredictable.<br />

this target machine does not have delayed branches<br />

The -fdelayed-branch option is not supported.<br />

too few arguments <strong>for</strong> <strong>for</strong>mat<br />

When checking the argument list of a call to printf, scanf, etc., the compiler found that<br />

the number of actual arguments was fewer than that required by the <strong>for</strong>mat string.<br />

DS51284H-page 198 © 2008 <strong>Microchip</strong> Technology Inc.

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

Saved successfully!

Ooh no, something went wrong!