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 392
2012 Microchip Technology Inc.
(237) function "*" redefined
(Parser)
More than one definition for a function has been encountered in this module. Function
overloading is illegal, for example:
overloading is illegal, for example:
int twice(int a)
{
return a*2;
}
/* only one prototype & definition of rv can exist */
long twice(long a)
{
return a*2;
}
(238) illegal initialization
(Parser)
You can’t initialize a typedef declaration, because it does not reserve any storage that
can be initialized, for example:
can be initialized, for example:
/* oops -- uint is a type, not a variable */
typedef unsigned int uint = 99;
(239) identifier "*" redefined (from line *)
(Parser)
This identifier has already been defined in the same scope. It cannot be defined again,
for example:
for example:
int a; /* a filescope variable called "a" */
int a; /* attempting to define another of the same name */
Note that variables with the same name, but defined with different scopes are legal, but
not recommended.
not recommended.
(240) too many initializers
(Parser)
There are too many initializers for this object. Check the number of initializers against
the object definition (array or structure), for example:
the object definition (array or structure), for example:
/* three elements, but four initializers */
int ivals[3] = { 2, 4, 6, 8};
(241) initialization syntax
(Parser)
The initialization of this object is syntactically incorrect. Check for the correct placement
and number of braces and commas, for example:
and number of braces and commas, for example:
int iarray[10] = {{’a’, ’b’, ’c’};
/* oops -- one two many {s */
(242) illegal type for switch expression
(Parser)
A switch operation must have an expression that is either an integral type or an enu-
merated value, e.g:
merated value, e.g:
double d;
switch(d) { /* oops -- this must be integral */
case ’1.0’:
d = 0;
}