Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
Error and Warning Messages
 2012 Microchip Technology Inc.
DS52053B-page 409
(365) pointer to non-static object returned 
(Parser)
This function returns a pointer to a non-static (e.g., auto) variable. This is likely to 
be an error, since the storage associated with automatic variables becomes invalid 
when the function returns, for example:
char * get_addr(void)
{
  char c;
  /* returning this is dangerous;
     the pointer could be dereferenced */
  return &c; 
}
(366) operands of "*" not same pointer type 
(Parser)
The operands of this operator are of different pointer types. This probably means you 
have used the wrong pointer, but if the code is actually what you intended, use a 
typecast to suppress the error message.
(367) identifier is already extern; can’t be static 
(Parser)
This function was already declared extern, possibly through an implicit declaration. It 
has now been redeclared static, but this redeclaration is invalid.
void main(void)
{
  /* at this point the compiler assumes set is extern... */
  set(10L, 6);  
}
/* now it finds out otherwise */
static void set(long a, int b)
{
  PORTA = a + b;
}
(368) array dimension on "*[]" ignored 
(Preprocessor)
An array dimension on a function parameter has been ignored because the argument 
is actually converted to a pointer when passed. Thus arrays of any size may be passed. 
Either remove the dimension from the parameter, or define the parameter using pointer 
syntax, for example:
/* param should be: "int array[]" or "int *" */
int get_first(int array[10]) 
{                             /* warning flagged here */
  return array[0];
}
(369) signed bitfields not supported 
(Parser)
Only unsigned bit-fields are supported. If a bit-field is declared to be type int, the 
compiler still treats it as unsigned, for example:
struct {
  signed int sign: 1;    /* oops -- this must be unsigned */
  signed int value: 7;
} ;
(370) illegal basic type; int assumed 
(Parser)
The basic type of a cast to a qualified basic type couldn’t not be recognized and the 
basic type was assumed to be int, for example:
/* here ling is assumed to be int */
unsigned char bar = (unsigned ling) ’a’;