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 />

built-in function ‘identifier’ declared as non-function<br />

The specified function has the same name as a built-in function, yet is declared as<br />

something other than a function.<br />

C<br />

C++ style comments are not allowed in ISO C89<br />

Use C style comments ‘/*’ <strong>and</strong> ‘*/’ instead of C++ style comments ‘//’.<br />

call-clobbered register used <strong>for</strong> global register variable<br />

Choose a register that is normally saved <strong>and</strong> restored by function calls (W8-W13), so<br />

that library routines will not clobber it.<br />

cannot inline function ‘main’<br />

The function ‘main’ is declared with the inline attribute. This is not supported, since<br />

main must be called from the C start-up code, which is compiled separately.<br />

can’t inline call to ‘identifier’ called from here<br />

The compiler was unable to inline the call to the specified function.<br />

case value ‘n’ not in enumerated type<br />

The controlling expression of a switch statement is an enumeration type, yet a case<br />

expression has the value n, which does not correspond to any of the enumeration<br />

values.<br />

case value ‘value’ not in enumerated type ‘name’<br />

‘value’ is an extra switch case that is not an element of the enumerated type ‘name’.<br />

cast does not match function type<br />

The return type of a function is cast to a type that does not match the function’s type.<br />

cast from pointer to integer of different size<br />

A pointer is cast to an integer that is not 16-bits wide.<br />

cast increases required alignment of target type<br />

When compiling with the -Wcast-align comm<strong>and</strong>-line option, the compiler verifies<br />

that casts do not increase the required alignment of the target type. For example, this<br />

warning message will be given if a pointer to char is cast as a pointer to int, since the<br />

aligned <strong>for</strong> char (byte alignment) is less than the alignment requirement <strong>for</strong> int (word<br />

alignment).<br />

character constant too long<br />

Character constants must not be too long.<br />

comma at end of enumerator list<br />

Unnecessary comma at the end of the enumerator list.<br />

comma operator in oper<strong>and</strong> of #if<br />

Not expecting a comma operator in the #if directive.<br />

comparing floating point with == or != is unsafe<br />

Floating-point values can be approximations to infinitely precise real numbers. Instead<br />

of testing <strong>for</strong> equality, use relational operators to see whether the two values have<br />

ranges that overlap.<br />

comparison between pointer <strong>and</strong> integer<br />

A pointer type is being compared to an integer type.<br />

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

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

Saved successfully!

Ooh no, something went wrong!