Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual
Product codes
SW006021-1
MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 386
2012 Microchip Technology Inc.
(180) unterminated comment in included file
(Preprocessor)
Comments begun inside an included file must end inside the included file.
(181) non-scalar types can’t be converted to other types
(Parser)
You can’t convert a structure, union or array to another type, for example:
struct TEST test;
struct TEST * sp;
sp = test; /* oops -- did you mean: sp = &test; ? */
(182) illegal conversion between types
(Parser)
This expression implies a conversion between incompatible types, i.e., a conversion of
a structure type into an integer, for example:
a structure type into an integer, for example:
struct LAYOUT layout;
int i;
layout = i; /* int cannot be converted to struct */
Note that even if a structure only contains an int , for example, it cannot be assigned
to an int variable, and vice versa.
to an int variable, and vice versa.
(183) function or function pointer required
(Parser)
Only a function or function pointer can be the subject of a function call, for example:
int a, b, c, d;
a = b(c+d); /* b is not a function --
did you mean a = b*(c+d) ? */
(184) calling an interrupt function is illegal
(Parser)
A function qualified interrupt can’t be called from other functions. It can only be
called by a hardware (or software) interrupt. This is because an interrupt function
has special function entry and exit code that is appropriate only for calling from an inter-
rupt. An interrupt function can call other non-interrupt functions.
called by a hardware (or software) interrupt. This is because an interrupt function
has special function entry and exit code that is appropriate only for calling from an inter-
rupt. An interrupt function can call other non-interrupt functions.
(185) function does not take arguments
(Parser, Code Generator)
This function has no parameters, but it is called here with one or more arguments, for
example:
example:
int get_value(void);
void main(void)
{
int input;
input = get_value(6); /* oops --
parameter should not be here */
}
(186) too many function arguments
(Parser)
This function does not accept as many arguments as there are here.
void add(int a, int b);
add(5, 7, input); /* call has too many arguments */
(187) too few function arguments
(Parser)
This function requires more arguments than are provided in this call, for example:
void add(int a, int b);
add(5); /* this call needs more arguments */