10.1 Messages 0 Thru 499

(1) too many errors (*) (all applications)

The executing compiler application has encountered too many errors and will exit immediately. Other uncompiled source files will be processed, but the compiler applications that would normally be executed in due course will not be run. The number of errors that can be accepted is controlled using the -fmax-errors option.

(2) error/warning (*) generated but no description available (all applications)

The executing compiler application has emitted a message (advisory/warning/error), but there is no description available in the message description file (MDF) to print. This could be because the MDF is out-of-date, or the message issue has not been translated into the selected language.

(3) malformed error information on line * in file * (all applications)

The compiler has attempted to load the messages for the selected language, but the message description file (MDF) was corrupted and could not be read correctly.

(100) unterminated #if[n][def] block from line * (Preprocessor)

A #if or similar block was not terminated with a matching #endif, for example:
#if INPUT        /* error flagged here */
int main(void)
{
    run();
}                /* no #endif was found in this module */

(101) #* cannot follow #else (Preprocessor)

A #else or #elif has been used in the same conditional block as a #else. These can only follow a #if, for example:
#ifdef FOO
    result = foo;
#else
    result = bar;
#elif defined(NEXT)   /* the #else above terminated the #if */
    result = next(0);
#endif

(102) #* must be in an #if (Preprocessor)

The #elif, #else or #endif directive must be preceded by a matching #if line. If there is an apparently corresponding #if line, check for things like extra #endifs, or improperly terminated comments, for example:
#ifdef FOO
    result = foo;
#endif
    result = bar;
#elif defined(NEXT)   /* the #endif above terminated the #if */
    result = next(0);
#endif

(103) #error: * (Preprocessor)

This is a programmer generated error; there is a directive causing a deliberate error. This is normally used to check compile time defines, etc. Remove the directive to remove the error, but first determine why the directive is there.

(104) preprocessor #assert failure (Preprocessor)

The argument to a preprocessor #assert directive has evaluated to zero. This is a programmer induced error.
#assert SIZE == 4  /* size should never be 4 */

(105) no #asm before #endasm (Preprocessor)

A #endasm operator has been encountered, but there was no previous matching #asm, for example:
void cleardog(void)
{
    clrwdt
    #endasm  /* in-line assembler ends here, only where did it begin? */
}

(106) nested #asm directives (Preprocessor)

It is not legal to nest #asm directives. Check for a missing or misspelled #endasm directive, for example:
#asm
    MOVE  r0, #0aah
#asm      ; previous #asm must be closed before opening another
    SLEEP
#endasm

(107) illegal # directive “*” (Preprocessor, Parser)

The compiler does not understand the # directive. It is probably a misspelling of a directive token, for example:
#indef DEBUG  /* oops -- that should be #undef DEBUG */

(108) #if[n][def] without an argument (Preprocessor)

The preprocessor directives #if, #ifdef, and #ifndef must have an argument. The argument to #if should be an expression, while the argument to #ifdef or #ifndef should be a single name, for example:
#if            /* oops -- no argument to check */
output = 10;
#else
output = 20;
#endif

(109) #include syntax error (Preprocessor)

The syntax of the filename argument to #include is invalid. The argument to #include must be a valid file name, either enclosed in double quotes " " or angle brackets < >. Spaces should not be included and the closing quote or bracket must be present. There should be nothing else on the line other than comments, for example:
#include stdio.h  /* oops -- should be: #include <stdio.h> */

(110) too many file arguments; usage: cpp [input [output]] (Preprocessor)

CPP should be invoked with at most two file arguments. Contact Microchip Technical Support if the preprocessor is being executed by a compiler driver.

(111) redefining preprocessor macro “*” (Preprocessor)

The macro specified is being redefined to something different than the original definition. If you want to deliberately redefine a macro, use #undef first to remove the original definition, for example:
#define ONE 1
/* elsewhere: */
/* Is this correct? It will overwrite the first definition. */
#define ONE one

(112) #define syntax error (Preprocessor)

A macro definition has a syntax error. This could be due to a macro or formal parameter name that does not start with a letter or a missing closing parenthesis, ), for example:
#define FOO(a, 2b)  bar(a, 2b)  /* 2b is not to be! */

(113) unterminated string in preprocessor macro body (Preprocessor, Assembler)

A macro definition contains a string that lacks a closing quote.

(114) illegal #undef argument (Preprocessor)

The argument to #undef must be a valid name. It must start with a letter, for example:
#undef 6YYY  /* this isn’t a valid symbol name */

(115) recursive preprocessor macro definition of “*” defined by “*” (Preprocessor)

The named macro has been defined in such a manner that expanding it causes a recursive expansion of itself.

(116) end of file within preprocessor macro argument from line * (Preprocessor)

A macro argument has not been terminated. This probably means the closing parenthesis has been omitted from a macro invocation. The line number given is the line where the macro argument started, for example:
#define FUNC(a, b) func(a+b)
FUNC(5, 6;    /* oops -- where is the closing bracket? */

(117) misplaced constant in #if (Preprocessor)

A constant in a #if expression should only occur in syntactically correct places. This error is probably caused by omission of an operator, for example:
#if FOO BAR  /* oops -- did you mean: #if FOO == BAR ? */

(118) stack overflow processing #if expression (Preprocessor)

The preprocessor filled up its expression evaluation stack in a #if expression. Simplify the expression – it probably contains too many parenthesized subexpressions.

(119) invalid expression in #if line (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(120) operator “*” in incorrect context (Preprocessor)

An operator has been encountered in a #if expression that is incorrectly placed (two binary operators are not separated by a value), for example:
#if FOO * % BAR == 4  /* what is "* %" ? */
#define BIG
#endif

(121) expression stack overflow at operator “*” (Preprocessor)

Expressions in #if lines are evaluated using a stack with a size of 128. It is possible for very complex expressions to overflow this. Simplify the expression.

(122) unbalanced parenthesis at operator “*” (Preprocessor)

The evaluation of a #if expression found mismatched parentheses. Check the expression for correct parenthesizing, for example:
#if ((A) + (B)  /* oops -- a missing ), I think */
#define ADDED
#endif

(123) misplaced “?” or “:”; previous operator is “*” (Preprocessor)

A colon operator has been encountered in a #if expression that does not match up with a corresponding ? operator, for example:
#if XXX : YYY  /* did you mean:  #if COND ? XXX : YYY */

(124) illegal character “*” in #if (Preprocessor)

There is a character in a #if expression that should not be there. Valid characters are the letters, digits and those comprising the acceptable operators, for example:
#if YYY  /* what are these characters doing here? */
int m;
#endif

(125) illegal character (* decimal) in #if (Preprocessor)

There is a non-printable character in a #if expression that should not be there. Valid characters are the letters, digits and those comprising the acceptable operators, for example:
#if ^S YYY  /* what is this control characters doing here? */
int m;
#endif

(126) strings can’t be used in #if (Preprocessor)

The preprocessor does not allow the use of strings in #if expressions, for example:
/* no string operations allowed by the preprocessor */
#if MESSAGE > "hello"
#define DEBUG
#endif

(127) bad syntax for defined() in #[el]if (Preprocessor)

The defined() pseudo-function in a preprocessor expression requires its argument to be a single name. The name must start with a letter and should be enclosed in parentheses, for example:
/* oops -- defined expects a name, not an expression */
#if defined(a&b)
input = read();
#endif

(128) illegal operator in #if (Preprocessor)

A #if expression has an illegal operator. Check for correct syntax, for example:
#if FOO = 6  /* oops -- should that be: #if FOO == 5 ? */

(129) unexpected “\” in #if (Preprocessor)

The backslash is incorrect in the #if statement, for example:
#if FOO == \34
#define BIG
#endif

(130) unknown type “*” in #[el]if sizeof() (Preprocessor)

An unknown type was used in a preprocessor sizeof(). The preprocessor can only evaluate sizeof() with basic types, or pointers to basic types, for example:
#if sizeof(unt) == 2  /* should be: #if sizeof(int) == 2 */
i = 0xFFFF;
#endif

(131) illegal type combination in #[el]if sizeof() (Preprocessor)

The preprocessor found an illegal type combination in the argument to sizeof() in a #if expression, for example:
/* To sign, or not to sign, that is the error. */
#if sizeof(signed unsigned int) == 2
i = 0xFFFF;
#endif

(132) no type specified in #[el]if sizeof() (Preprocessor)

sizeof() was used in a preprocessor #if expression, but no type was specified. The argument to sizeof() in a preprocessor expression must be a valid simple type, or pointer to a simple type, for example:
#if sizeof()  /* oops -- size of what? */
i = 0;
#endif

(133) unknown type code (0x*) in #[el]if sizeof() (Preprocessor)

The preprocessor has made an internal error in evaluating a sizeof() expression. Check for a malformed type specifier. This is an internal error. Contact Microchip Technical Support with details.

(134) syntax error in #[el]if sizeof() (Preprocessor)

The preprocessor found a syntax error in the argument to sizeof() in a #if expression. Probable causes are mismatched parentheses and similar things, for example:
#if sizeof(int == 2)  // oops - should be: #if sizeof(int) == 2
i = 0xFFFF;
#endif

(135) unknown operator (*) in #if (Preprocessor)

The preprocessor has tried to evaluate an expression with an operator it does not understand. This is an internal error. Contact Microchip Technical Support with details.

(137) strange character “*” after ## (Preprocessor)

A character has been seen after the token catenation operator ## that is neither a letter nor a digit. Because the result of this operator must be a legal token, the operands must be tokens containing only letters and digits, for example:
/* the ’ character will not lead to a valid token */
#define cc(a, b) a ## ’b

(138) strange character (*) after ## (Preprocessor)

An unprintable character has been seen after the token catenation operator ## that is neither a letter nor a digit. Because the result of this operator must be a legal token, the operands must be tokens containing only letters and digits, for example:
/* the ’ character will not lead to a valid token */
#define cc(a, b) a ## ’b

(139) end of file in comment (Preprocessor)

End of file was encountered inside a comment. Check for a missing closing comment flag, for example:
/* Here the comment begins. I’m not sure where I end, though
}

(140) can’t open * file “*”: * (Driver, Preprocessor, Code Generator, Assembler)

The command file specified could not be opened for reading. Confirm the spelling and path of the file specified on the command line, for example:
xc8 @communds

should that be:

xc8 @commands

(141) can’t open * file “*”: * (Any)

An output file could not be created. Confirm the spelling and path of the file specified on the command line.

(144) too many nested #if blocks (Preprocessor)

#if, #ifdef, etc., blocks can only be nested to a maximum of 32.

(146) #include filename too long (Preprocessor)

A filename constructed while looking for an include file has exceeded the length of an internal buffer. Because this buffer is 4096 bytes long, this is unlikely to happen.

(147) too many #include directories specified (Preprocessor)

A maximum of 7 directories can be specified for the preprocessor to search for include files. The number of directories specified with the driver is too many.

(148) too many arguments for preprocessor macro (Preprocessor)

A macro can only have up to 31 parameters, per the C Standard.

(149) preprocessor macro work area overflow (Preprocessor)

The total length of a macro expansion has exceeded the size of an internal table. This table is normally 32768 bytes long. Thus any macro expansion must not expand to a total of more than 32K bytes.

(150) illegal “__” preprocessor macro “*” (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(151) too many arguments in preprocessor macro expansion (Preprocessor)

There were too many arguments supplied in a macro invocation. The maximum number allowed is 31.

(152) bad dp/nargs in openpar(): c = * (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(153) out of space in preprocessor macro * argument expansion (Preprocessor)

A macro argument has exceeded the length of an internal buffer. This buffer is normally 4096 bytes long.

(155) work buffer overflow concatenating “*” (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(156) work buffer “*” overflow (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(157) can’t allocate * bytes of memory (Code Generator, Assembler)

This is an internal compiler error. Contact Microchip Technical Support with details.

(158) invalid disable in preprocessor macro “*” (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(159) too many calls to unget() (Preprocessor)

This is an internal compiler error. Contact Microchip Technical Support with details.

(161) control line “*” within preprocessor macro expansion
 (Preprocessor)

A preprocessor control line (one starting with a #) has been encountered while expanding a macro. This should not happen.

(162) #warning: * (Preprocessor, Driver)

This warning is either the result of user-defined #warning preprocessor directive, or the driver encountered a problem reading the map file. If the latter, contact Microchip Technical Support with details

(163) unexpected text in control line ignored (Preprocessor)

This warning occurs when extra characters appear on the end of a control line. The extra text will be ignored, but a warning is issued. It is preferable (and in accordance with Standard C) to enclose the text as a comment, for example:
#if defined(END)
#define NEXT
#endif END     /* END would be better in a comment here */

(164) #include filename “*” was converted to lower case (Preprocessor)

The #include file name had to be converted to lowercase before it could be opened, for example:
#include <STDIO.H>  /* oops -- should be: #include <stdio.h> */

(165) #include filename “*” does not match actual name (check upper/lower case)
 (Preprocessor)

In Windows versions this means the file to be included actually exists and is spelled the same way as the #include filename; however, the case of each does not exactly match. For example, specifying #include “code.c” will include Code.c, if it is found. In Linux versions this warning could occur if the file wasn’t found.

(166) too few values specified with option “*” (Preprocessor)

The list of values to the preprocessor (CPP) -S option is incomplete. This should not happen if the preprocessor is being invoked by the compiler driver. The values passed to this option represent the sizes of char, short, int, long, float and double types.

(167) too many values specified with -S option; “*” unused Preprocessor)

There were too many values supplied to the -S preprocessor option. See message 166.

(168) unknown option “*” (Any)

The option given to the component which caused the error is not recognized.

(169) strange character (*) after ## (Preprocessor)

There is an unexpected character after #.

(170) symbol “*” in undef was never defined (Preprocessor)

The symbol supplied as argument to #undef was not already defined. This warning can be disabled with some compilers. This warning can be avoided with code like:
#ifdef SYM
#undef SYM  /* only undefine if defined */
#endif

(171) wrong number of preprocessor macro arguments for “*” (* instead of *) 
 (Preprocessor)

A macro has been invoked with the wrong number of arguments, for example:
#define ADD(a, b) (a+b)
ADD(1, 2, 3)        /* oops -- only two arguments required */

(172) formal parameter expected after # (Preprocessor)

The stringization operator # (not to be confused with the leading # used for preprocessor control lines) must be followed by a formal macro parameter, for example:
#define str(x) #y  /* oops -- did you mean x instead of y? */

If you need to stringize a token, you will need to define a special macro to do it, for example:

#define __mkstr__(x) #x

then use __mkstr__(token) wherever you need to convert token into a string.

(173) undefined symbol “*” in #if; 0 used (Preprocessor)

A symbol on a #if expression was not a defined preprocessor macro. For the purposes of this expression, its value has been taken as zero. This warning can be disabled with some compilers. Example:
#if FOO+BAR    /* e.g. FOO was never #defined */
#define GOOD
#endif

(174) multi-byte constant “*” isn’t portable (Preprocessor)

Multi-byte constants are not portable; and will be rejected by later passes of the compiler, for example:
#if CHAR == ’ab’
#define MULTI
#endif

(175) division by zero in #if; zero result assumed (Preprocessor)

Inside a #if expression, there is a division by zero which has been treated as yielding zero, for example:
#if foo/0  /* divide by 0: was this what you were intending? */
int a;
#endif

(176) missing newline (Preprocessor)

A new line is missing at the end of the line. Each line, including the last line, must have a new line at the end. This problem is normally introduced by editors.

(177) symbol “*” in -U option was never defined (Preprocessor)

A macro name specified in a -U option to the preprocessor was not initially defined, and thus cannot be undefined.

(179) nested comments (Preprocessor)

This warning is issued when nested comments are found. A nested comment can indicate that a previous closing comment marker is missing or malformed, for example:
output = 0;  /* a comment that was left unterminated
flag = TRUE; /* next comment:
hey, where did this line go? */

(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 cannot 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:
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.

(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 cannot 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 interrupt. 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:
int get_value(void);
int 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 */

(188) constant expression required (Parser)

In this context an expression is required that can be evaluated to a constant at compile time, for example:
int a;
switch(input) {
case a:  /* oops!
cannot use variable as part of a case label */
input++;
}

(189) illegal type for array dimension (Parser)

An array dimension must be either an integral type or an enumerated value.
int array[12.5];  /* oops -- twelve and a half elements, eh? */

(190) illegal type for index expression (Parser)

An index expression must be either integral or an enumerated value, for example:
int i, array[10];
i = array[3.5];   /* oops --
exactly which element do you mean? */

(191) cast type must be scalar or void (Parser)

A typecast (an abstract type declarator enclosed in parentheses) must denote a type which is either scalar (i.e., not an array or a structure) or the type void, for example:
lip = (long [])input;  /* oops -- possibly: lip = (long *)input */

(192) undefined identifier “*” (Parser)

This symbol has been used in the program, but has not been defined or declared. Check for spelling errors if you think it has been defined.

(193) not a variable identifier “*” (Parser)

This identifier is not a variable; it can be some other kind of object, i.e., a label.

(194) “)” expected (Parser)

A closing parenthesis, ), was expected here. This can indicate you have left out this character in an expression, or you have some other syntax error. The error is flagged on the line at which the code first starts to make no sense. This can be a statement following the incomplete expression, for example:
if(a == b  /* the closing parenthesis is missing here */
b = 0;   /* the error is flagged here */

(195) expression syntax (Parser)

This expression is badly formed and cannot be parsed by the compiler, for example:
a /=% b;  /* oops -- possibly that should be: a /= b; */

(196) struct/union required (Parser)

A structure or union identifier is required before a dot “.” , for example:
int a;
a.b = 9;  /* oops -- a is not a structure */

(197) struct/union member expected (Parser)

A structure or union member name must follow a dot “.” or an arrow (“->”).

(198) undefined struct/union “*” (Parser)

The specified structure or union tag is undefined, for example:
struct WHAT what;  /* a definition for WHAT was never seen */

(199) logical type required (Parser)

The expression used as an operand to if, while statements or to boolean operators like ! and && must be a scalar integral type, for example:
struct FORMAT format;
if(format)            /* this operand must be a scaler type */
    format.a = 0;

(200) taking the address of a register variable is illegal (Parser)

A variable declared register cannot have storage allocated for it in memory, and thus it is illegal to attempt to take the address of it by applying the & operator, for example:
int * proc(register int in)
{
    int * ip = &in;
    /* oops -- in cannot have an address to take */
    return ip;
}

(201) taking the address of this object is illegal (Parser)

The expression which was the operand of the & operator is not one that denotes memory storage (“an lvalue”) and therefore its address cannot be defined, for example:
ip = &8;  /* oops -- you cannot take the address of a literal */

(202) only lvalues can be assigned to or modified (Parser)

Only an lvalue (i.e., an identifier or expression directly denoting addressable storage) can be assigned to or otherwise modified, for example:
int array[10];
int * ip;
char c;
array = ip;   /* array is not a variable, it cannot be written to */

A typecast does not yield an lvalue, for example:

/* the contents of c cast to int is only a intermediate value */
(int)c = 1;

However, you can write this using pointers:

*(int *)&c = 1

(203) illegal operation on bit variable (Parser)

Not all operations on bit variables are supported. This operation is one of those, for example:
bit   b;
int * ip;
ip = &b;  /* oops -- cannot take the address of a bit object */

(204) void function can’t return a value (Parser)

A void function cannot return a value. Any return statement should not be followed by an expression, for example:
void run(void)
{
    step();
    return 1;  /* either run should not be void, or remove the 1 */
}

(205) integral type required (Parser)

This operator requires operands that are of integral type only.

(206) illegal use of void expression (Parser)

A void expression has no value and therefore you cannot use it anywhere an expression with a value is required, i.e., as an operand to an arithmetic operator.

(207) simple type required for “*” (Parser)

A simple type (i.e., not an array or structure) is required as an operand to this operator.

(208) operands of “*” not same type (Parser)

The operands of this operator are of different pointers, for example:
int * ip;
char * cp, * cp2;
cp = flag ? ip : cp2;  /* result of ? : will be int * or char * */

Possibly, you meant something like:

cp = flag ? (char *)ip : cp2;

(209) type conflict (Parser)

The operands of this operator are of incompatible types.

(210) bad size list (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(211) taking sizeof bit is illegal (Parser)

It is illegal to use the sizeof() operator with the C __bit type. When used against a type, the sizeof() operator gives the number of bytes required to store an object that type. Therefore its usage with the __bit type make no sense and it is an illegal operation.

(212) missing number after pragma “pack” (Parser)

The pragma pack requires a decimal number as argument. This specifies the alignment of each member within the structure. Use this with caution as some processors enforce alignment and will not operate correctly if word fetches are made on odd boundaries, for example:
#pragma pack  /* what is the alignment value */

Possibly, you meant something like:

#pragma pack 2

(214) missing number after pragma “interrupt_level” (Parser)

The pragma interrupt_level requires an argument to indicate the interrupt level. It will be the value 1 for mid-range devices, or 1 or 2 or PIC18 devices.

(215) missing argument to pragma “switch” (Parser)

The pragma switch requires an argument of auto, direct or simple, for example:
#pragma switch  /* oops -- this requires a switch mode */

Possibly, you meant something like:

#pragma switch simple

(216) missing argument to pragma “psect” (Parser)

The pragma psect requires an argument of the form oldname = newname where oldname is an existing psect name known to the compiler and newname is the desired new name, for example:
#pragma psect  /* oops -- this requires an psect to redirect */

Possibly, you meant something like:

#pragma psect text=specialtext

(218) missing name after pragma “inline” (Parser)

The inline pragma expects the name of a function to follow. The function name must be recognized by the code generator for it to be expanded; other functions are not altered, for example:
#pragma inline  /* what is the function name? */

Possibly, you meant something like:

#pragma inline memcpy

(219) missing name after pragma “printf_check” (Parser)

The printf_check pragma expects the name of a function to follow. This specifies printf-style format string checking for the function, for example:
#pragma printf_check  /* what function is to be checked? */

Possibly, you meant something like:

#pragma printf_check sprintf

Pragmas for all the standard printf-like function are already contained in <stdio.h>.

(220) exponent expected (Parser)

A floating-point constant must have at least one digit after the e or E, for example:
float f;
f = 1.234e;  /* oops -- what is the exponent? */

(221) hexadecimal digit expected (Parser)

After 0x should follow at least one of the HEX digits 0-9 and A-F or a-f, for example:
a = 0xg6;  /* oops -- was that meant to be a = 0xf6 ? */

(222) binary digit expected (Parser)

A binary digit was expected following the 0b format specifier, for example:
i = 0bf000;  /* oops -- f000 is not a base two value */

(223) digit out of range (Parser, Assembler)

A digit in this number is out of range of the radix for the number, i.e., using the digit 8 in an octal number, or HEX digits A-F in a decimal number. An octal number is denoted by the digit string commencing with a zero, while a HEX number starts with 0X or 0x. For example:
int a = 058; /* leading 0 implies octal which has digits 0 - 7 */

(224) illegal “#” directive (Parser)

An illegal # preprocessor has been detected. Likely, a directive has been misspelled in your code somewhere.

(225) missing character in character constant (Parser)

The character inside the single quotes is missing, for example:
char c = ";  /* the character value of what? */

(226) char const too long (Parser)

A character constant enclosed in single quotes cannot contain more than one character, for example:
c = ’12’;  /* oops -- only one character can be specified */

(227) “.” expected after “..” (Parser)

The only context in which two successive dots can appear is as part of the ellipsis symbol, which must have 3 dots (an ellipsis is used in function prototypes to indicate a variable number of parameters).

Either .. was meant to be an ellipsis symbol which would require you to add an extra dot, or it was meant to be a structure member operator which would require you to remove one dot.

(228) illegal character (*) (Parser)

This character is illegal in the C code. Valid characters are the letters, digits and those comprising the acceptable operators, for example:
c = a;  /* oops -- did you mean c = ’a’; ? */

(229) unknown qualifier “*” given to -A (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(230) missing argument to -A (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(231) unknown qualifier “*” given to -I (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(232) missing argument to -I (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(233) bad -Q option “*” (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(234) close error (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(236) simple integer expression required (Parser)

A simple integral expression is required after the __at() operator, used to associate an absolute address with a variable, for example:
int address;
char LOCK __at(address);

(237) function “*” redefined (Parser)

More than one definition for a function has been encountered in this module. Function 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 cannot initialize a typedef declaration, because it does not reserve any storage that 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:
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.

(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:
/* 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:
int iarray[10] = {{’a’, ’b’, ’c’};
/* oops -- one two many {s */

(242) illegal type for switch expression (Parser)

A switch() operator must have an expression that is either an integral type or an enumerated value, e.g:
double d;
switch(d) {  /* oops -- this must be integral */
case ’1.0’:
    d = 0;
}

(243) inappropriate break/continue (Parser)

A break or continue statement has been found that is not enclosed in an appropriate control structure. A continue can only be used inside a while, for, or do while loop, while break can only be used inside those loops or a switch statement, for example:
switch(input) {
case 0:
    if(output == 0)
        input = 0xff;
    } /* oops! this should not be here; it closed the switch */
    break;     /* this should be inside the switch */

(244) “default” case redefined (Parser)

Only one default label is allowed to be in a switch() statement. You have more than one, for example:
switch(a) {
default:     /* if this is the default case... */
    b = 9;
    break;
default:     /* then what is this? */
    b = 10;
    break;

(245) “default” case not in switch (Parser)

A label has been encountered called default, but it is not enclosed by a switch statement. A default label is only legal inside the body of a switch statement.

If there is a switch statement before this default label, there could be one too many closing braces in the switch code. That would prematurely terminate the switch statement. See message 246.

(246) case label not in switch (Parser)

A case label has been encountered, but there is no enclosing switch statement. A case label can only appear inside the body of a switch statement.

If there is a switch statement before this case label, there might be one too many closing braces in the switch code. That would prematurely terminate the switch statement, for example:

switch(input) {
case ’0’:
    count++;
    break;
case ’1’:
    if(count>MAX)
        count= 0;
    }          /* oops -- this shouldn’t be here */
    break;
case ’2’:    /* error flagged here */

(247) duplicate label “*” (Parser)

The same name is used for a label more than once in this function. Note that the scope of labels is the entire function, not just the block that encloses a label, for example:
start:
if(a > 256)
    goto end;
start:           /* error flagged here */
if(a == 0)
    goto start;  /* which start label do I jump to? */

(248) inappropriate “else” (Parser)

An else keyword has been encountered that cannot be associated with an if statement. This can mean there is a missing brace or other syntactic error, for example:
/* here is a comment which I have forgotten to close...
if(a > b) {
    c = 0;
/* ... that will be closed here, thus removing the "if" */
else        /* my "if" has been lost */
    c = 0xff;

(249) probable missing “}” in previous block (Parser)

The compiler has encountered what looks like a function or other declaration, but the preceding function was ended with a closing brace. This probably means that a closing brace has been omitted from somewhere in the previous function, although it might not be the last one, for example:
void set(char a)
{
    PORTA = a;
    /* the closing brace was left out here */
void clear(void)  /* error flagged here */
{
    PORTA = 0;
}

(251) array dimension redeclared (Parser)

An array dimension has been declared as a different non-zero value from its previous declaration. It is acceptable to redeclare the size of an array that was previously declared with a zero dimension; but, not otherwise, for example:
extern int array[5];
int array[10];        /* oops -- has it 5 or 10 elements? */

(252) argument * conflicts with prototype (Parser)

The argument specified (argument 0 is the left most argument) of this function definition does not agree with a previous prototype for this function, for example:
/* this is supposedly calc’s prototype */
extern int calc(int, int);
int calc(int a, long int b)  /* hmmm -- which is right? */
{                            /* error flagged here */
    return sin(b/a);
}

(253) argument list conflicts with prototype (Parser)

The argument list in a function definition is not the same as a previous prototype for that function. Check that the number and types of the arguments are all the same.
extern int calc(int);   /* this is supposedly calc’s prototype */
int calc(int a, int b)  /* hmmm -- which is right? */
{                       /* error flagged here */
    return a + b;
}

(254) undefined *: “*” (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(255) not a member of the struct/union “*” (Parser)

This identifier is not a member of the structure or union type with which it used here, for example:
struct {
    int a, b, c;
} data;
if(data.d)    /* oops -- there is no member d in this structure */
    return;

(256) too much indirection (Parser)

A pointer declaration can only have 16 levels of indirection.

(257) only “register” storage class allowed (Parser)

The only storage class allowed for a function parameter is register, for example:
void process(static int input)

(258) duplicate qualifier (Parser)

There are two occurrences of the same qualifier in this type specification. This can occur either directly or through the use of a typedef. Remove the redundant qualifier. For example:
typedef volatile int vint;
/* oops -- this results in two volatile qualifiers */
volatile vint very_vol;

(259) object can’t be qualified both far and near (Parser)

It is illegal to qualify a type as both far and near, for example:
far near int spooky;  /* oops -- choose far or near, not both */

(260) undefined enum tag “*” (Parser)

This enum tag has not been defined, for example:
enum WHAT what;  /* a definition for WHAT was never seen */

(261) struct/union member “*” redefined (Parser)

This name of this member of the struct or union has already been used in this struct or union, for example:
struct {
    int a;
    int b;
    int a;  /* oops -- a different name is required here */
} input;

(262) struct/union “*” redefined (Parser)

A structure or union has been defined more than once, for example:
struct {
    int a;
} ms;
struct {
    int a;
} ms;    /* was this meant to be the same name as above? */

(263) members can’t be functions (Parser)

A member of a structure or a union cannot be a function. It could be a pointer to a function, for example:
struct {
    int a;
    int get(int);  /* should be a pointer: int (*get)(int); */
} object;

(264) bad bitfield type (Parser)

A bit-field can only have a type of int (or unsigned), for example:
struct FREG {
    char b0:1;   /* these must be part of an int, not char */
    char   :6;
    char b7:1;
} freg;

(265) integer constant expected (Parser)

A colon appearing after a member name in a structure declaration indicates that the member is a bit-field. An integral constant must appear after the colon to define the number of bits in the bit-field, for example:
struct {
    unsigned first:  /* oops -- should be: unsigned first; */
    unsigned second;
} my_struct;

If this was meant to be a structure with bit-fields, then the following illustrates an example:

struct {
    unsigned first : 4;  /* 4 bits wide */
    unsigned second: 4;  /* another 4 bits */
} my_struct;

(266) storage class illegal (Parser)

A structure or union member cannot be given a storage class. Its storage class is determined by the storage class of the structure, for example:
struct {
    /* no additional qualifiers can be present with members */
    static int first;
} ;

(267) bad storage class (Code Generator)

The code generator has encountered a variable definition whose storage class is invalid, for example:
auto int foo; /* auto not permitted with global variables */
int power(static int a)  /* parameters cannot be static */
{
    return foo * a;
}

(268) inconsistent storage class (Parser)

A declaration has conflicting storage classes. Only one storage class should appear in a declaration, for example:
extern static int where;  /* so is it static or extern? */

(269) inconsistent type (Parser)

Only one basic type can appear in a declaration, for example:
int float input;  /* is it int or float? */

(270) variable can’t have storage class “register” (Parser)

Only function parameters or auto variables can be declared using the register qualifier, for example:
register int gi;      /* this cannot be qualified register */
int process(register int input)  /* this is okay */
{
    return input + gi;
}

(271) type can’t be long (Parser)

Only int and double can be qualified with long.
long char lc;  /* what? */

(272) type can’t be short (Parser)

Only int can be modified with short, for example:
short float sf;  /* what? */

(273) type can’t be both signed and unsigned (Parser)

The type modifiers signed and unsigned cannot be used together in the same declaration, as they have opposite meaning, for example:
signed unsigned int confused;  /* which is it? */

(274) type can’t be unsigned (Parser)

A floating-point type cannot be made unsigned, for example:
unsigned float uf;  /* what? */

(275) “...” illegal in non-prototype argument list (Parser)

The ellipsis symbol can only appear as the last item in a prototyped argument list. It cannot appear on its own, nor can it appear after argument names that do not have types; i.e., K&R-style non-prototype function definitions. For example:
/* K&R-style non-prototyped function definition */
int kandr(a, b, ...)
    int a, b;
{

(276) type specifier required for prototyped argument (Parser)

A type specifier is required for a prototyped argument. It is not acceptable to just have an identifier.

(277) can’t mix prototyped and non-prototyped arguments (Parser)

A function declaration can only have all prototyped arguments (i.e., with types inside the parentheses) or all K&R style arguments (i.e., only names inside the parentheses and the argument types in a declaration list before the start of the function body), for example:
int plus(int a, b)  /* oops -- a is prototyped, b is not */
int b;
{
    return a + b;
}

(278) argument “*” redeclared (Parser)

The specified argument is declared more than once in the same argument list, for example:
/* cannot have two parameters called "a" */
int calc(int a, int a)

(279) initialization of function arguments is illegal (Parser)

A function argument cannot have an initializer in a declaration. The initialization of the argument happens when the function is called and a value is provided for the argument by the calling function, for example:
/* oops -- a is initialized when proc is called */
extern int proc(int a = 9);

(280) arrays of functions are illegal (Parser)

You cannot define an array of functions. You can, however, define an array of pointers to functions, for example:
int * farray[]();  /* oops -- should be: int (* farray[])(); */

(281) functions can’t return functions (Parser)

A function cannot return a function. It can return a function pointer. A function returning a pointer to a function could be declared like this: int (* (name()))(). Note the many parentheses that are necessary to make the parts of the declaration bind correctly.

(282) functions can’t return arrays (Parser)

A function can return only a scalar (simple) type or a structure. It cannot return an array.

(283) dimension required (Parser)

Only the most significant (i.e., the first) dimension in a multi-dimension array cannot be assigned a value. All succeeding dimensions must be present as a constant expression, for example:
/* This should be, for example: int arr[][7] */
int get_element(int arr[2][])
{
    return array[1][6];
}

(284) invalid dimension (Parser)

The array dimension specified is not valid. It must be larger than 0.
int array[0];  // oops -- you cannot have an array of size 0

(285) no identifier in declaration (Parser)

The identifier is missing in this declaration. This error can also occur when the compiler has been confused by such things as missing closing braces, for example:
void interrupt(void)  /* what is the name of this function? */
{
}

(286) declarator too complex (Parser)

This declarator is too complex for the compiler to handle. Examine the declaration and find a way to simplify it. If the compiler finds it too complex, so will anybody maintaining the code.

(287) arrays of bits or pointers to bit are illegal (Parser)

It is not legal to have an array of __bit objects, or a pointer to bit variable, for example:
bit barray[10];  /* wrong -- no bit arrays */
bit * bp;        /* wrong -- no pointers to bit variables */

(288) the type 'void' is applicable only to functions (Parser)

A variable cannot be void. Only a function can be void, for example:
int a;
void b;  /* this makes no sense */

(289) the specifier 'interrupt' is applicable only to functions (Parser)

The qualifier interrupt cannot be applied to anything except a function, for example:
/* variables cannot be qualified interrupt */
interrupt int input;

(290) illegal function qualifier(s) (Parser)

A qualifier has been applied to a function which makes no sense in this context. Some qualifier only make sense when used with an lvalue, i.e., const or volatile. This can indicate that you have forgotten a star, *, that is indicating that the function should return a pointer to a qualified object, for example:
const char ccrv(void) /* const * char ccrv(void) perhaps? */
{                     /* error flagged here */
    return ccip;
}

(291) K&R identifier “*” not an argument (Parser)

This identifier, that has appeared in a K&R style argument declarator, is not listed inside the parentheses after the function name, for example:
int process(input)
int unput;        /* oops -- that should be int input; */
{
}

(292) a function is not a valid parameter type (Parser)

A function parameter cannot be a function. It can be a pointer to a function, so perhaps a * has been omitted from the declaration.

(293) bad size in index_type() (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(294) can’t allocate * bytes of memory (Code Generator, Hexmate)

This is an internal compiler error. Contact Microchip Technical Support with details.

(295) expression too complex (Parser)

This expression has caused overflow of the compiler’s internal stack and should be rearranged or split into two expressions.

(296) out of memory (Objtohex)

This could be an internal compiler error. Contact Microchip Technical Support with details.

(297) bad argument (*) to tysize() (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(298) end of file in #asm (Preprocessor)

An end of file has been encountered inside a #asm block. This probably means the #endasm is missing or misspelled, for example:
#asm
MOV  r0, #55
MOV  [r1], r0
}                /* oops -- where is the #endasm */

(300) unexpected end of file (Parser)

An end-of-file in a C module was encountered unexpectedly, for example:
int main(void)
{
    init();
    run();    /* is that it? What about the close brace */

(301) end of file on string file (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(302) can’t reopen “*”: * (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(303) can’t allocate * bytes of memory (line *) (Parser)

The parser was unable to allocate memory for the longest string encountered, as it attempts to sort and merge strings. Try reducing the number or length of strings in this module.

(306) can’t allocate * bytes of memory for * (Code Generator)

This is an internal compiler error. Contact Microchip Technical Support with details.

(307) too many qualifier names (Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(308) too many case labels in switch (Code Generator)

There are too many case labels in this switch statement. The maximum allowable number of case labels in any one switch statement is 511.

(309) too many symbols (Assembler, Parser)

There are too many symbols for the assembler’s symbol table. Reduce the number of symbols in your program.

(310) “]” expected (Parser)

A closing square bracket was expected in an array declaration or an expression using an array index, for example:
process(carray[idx);  /* oops --
should be: process(carray[idx]); */

(311) closing quote expected (Parser)

A closing quote was expected for the indicated string.

(312) “*” expected (Parser)

The indicated token was expected by the parser.

(313) function body expected (Parser)

Where a function declaration is encountered with K&R style arguments (i.e., argument names; but, no types inside the parentheses) a function body is expected to follow, for example:
/* the function block must follow, not a semicolon */
int get_value(a, b);

(314) “;” expected (Parser)

A semicolon is missing from a statement. A close brace or keyword was found following a statement with no terminating semicolon , for example:
while(a) {
    b = a--  /* oops -- where is the semicolon? */
}          /* error is flagged here */

Note: Omitting a semicolon from statements not preceding a close brace or keyword typically results in some other error being issued for the following code which the parser assumes to be part of the original statement.

(315) “{” expected (Parser)

An opening brace was expected here. This error can be the result of a function definition missing the opening brace, for example:
/* oops! no opening brace after the prototype */
void process(char c)
    return max(c, 10) * 2; /* error flagged here */
}

(316) “}” expected (Parser)

A closing brace was expected here. This error can be the result of a initialized array missing the closing brace, for example:
char carray[4] = { 1, 2, 3, 4;  /* oops -- no closing brace */

(317) “(” expected (Parser)

An opening parenthesis , (, was expected here. This must be the first token after a while , for , if , do or asm keyword, for example:
if a == b  /* should be: if(a == b) */
b = 0;

(318) string expected (Parser)

The operand to an asm statement must be a string enclosed in parentheses, for example:
asm(nop);  /* that should be asm("nop");

(319) while expected (Parser)

The keyword while is expected at the end of a do statement, for example:
do {
    func(i++);
}             /* do the block while what condition is true? */
if(i > 5)     /* error flagged here */
    end();

(320) “:” expected (Parser)

A colon is missing after a case label, or after the keyword default. This often occurs when a semicolon is accidentally typed instead of a colon, for example:
switch(input) {
case 0;         /* oops -- that should have been: case 0: */
    state = NEW;

(321) label identifier expected (Parser)

An identifier denoting a label must appear after goto, for example:
if(a)
    goto 20;
    /* this is not BASIC -- a valid C label must follow a goto */

(322) enum tag or “{” expected (Parser)

After the keyword enum, must come either an identifier that is, or will be, defined as an enum tag, or an opening brace, for example:
enum 1, 2;  /* should be, for example: enum {one=1, two }; */

(323) struct/union tag or “{” expected (Parser)

An identifier denoting a structure or union or an opening brace must follow a struct or union keyword, for example:
struct int a;  /* this is not how you define a structure */

You might mean something like:

struct {
    int a;
} my_struct;

(324) too many arguments for printf-style format string (Parser)

There are too many arguments for this format string. This is harmless, but can represent an incorrect format string, for example:
/* oops -- missed a placeholder? */
printf("%d - %d", low, high, median);

(325) error in printf-style format string (Parser)

There is an error in the format string here. The string has been interpreted as a printf() style format string, and it is not syntactically correct. If not corrected, this will cause unexpected behavior at runtime, for example:
printf("%l", lll);  /* oops -- possibly: printf("%ld", lll); */

(326) long int argument required in printf-style format string (Parser)

A long argument is required for this format specifier. Check the number and order of format specifiers and corresponding arguments, for example:
printf("%lx", 2);  // possibly you meant: printf("%lx", 2L);

(327) long long int argument required in printf-style format string (Parser)

A long long argument is required for this format specifier. Check the number and order of format specifiers and corresponding arguments, for example:
printf("%llx", 2);  // possibly you meant: printf("%llx", 2LL);

(328) int argument required in printf-style format string (Parser)

An integral argument is required for this printf-style format specifier. Check the number and order of format specifiers and corresponding arguments, for example:
printf("%d", 1.23); /* wrong number or wrong placeholder */

(329) double argument required in printf-style format string (Parser)

The printf format specifier corresponding to this argument is %f or similar, and requires a floating-point expression. Check for missing or extra format specifiers or arguments to printf.
printf("%f", 44);  /* should be: printf("%f", 44.0); */

(330) pointer to * argument required in printf-style format string (Parser)

A pointer argument is required for this format specifier. Check the number and order of format specifiers and corresponding arguments.

(331) too few arguments for printf-style format string (Parser)

There are too few arguments for this format string. This would result in a garbage value being printed or converted at runtime, for example:
printf("%d - %d", low); /* oops! where is the other value to print? */

(332) “interrupt_level” should be 0 to 7 (Parser)

The pragma interrupt_level must have an argument from 0 to 7; however, mid-range devices only use level 1. PIC18 devices can use levels 1 or 2. For example:
#pragma interrupt_level  9 /* oops -- the level is too high */
void interrupt isr(void)
{
    /* isr code goes here */
}

(333) unrecognized qualifier name after “strings” (Parser)

The pragma strings was passed a qualifier that was not identified, for example:
/* oops -- should that be #pragma strings const ? */
#pragma strings cinst

(334) unrecognized qualifier name after “printf_check” (Parser)

The #pragma printf_check was passed a qualifier that could not be identified, for example:
/* oops -- should that be const not cinst? */
#pragma printf_check(printf) cinst

(335) unknown pragma “*” (Parser)

An unknown pragma directive was encountered, for example:
#pragma rugsused myFunc w  /* I think you meant regsused */

(336) string concatenation across lines (Parser)

Strings on two lines will be concatenated. Check that this is the desired result, for example:
char * cp = "hi"
"there";    /* this is okay, but is it what you had intended? */

(337) line does not have a newline on the end (Parser)

The last line in the file is missing the newline (operating system dependent character) from the end. Some editors will create such files, which can cause problems for include files. The C standard requires all source files to consist of complete lines only.

(338) can’t create * file “*” (Any)

The application tried to create or open the named file, but it could not be created. Check that all file path names are correct.

(339) initializer in extern declaration (Parser)

A declaration containing the keyword extern has an initializer. This overrides the extern storage class, because to initialize an object it is necessary to define (i.e., allocate storage for) it, for example:
extern int other = 99;  /* if it’s extern and not allocated
storage, how can it be initialized? */

(340) string not terminated by null character (Parser)

A char array is being initialized with a string literal larger than the array. Hence there is insufficient space in the array to safely append a null terminating character, for example:
char foo[5] = "12345"; /* the string stored in foo won’t have
a null terminating, i.e.
foo = [’1’, ’2’, ’3’, ’4’, ’5’] */

(343) implicit return at end of non-void function (Parser)

A function that has been declared to return a value has an execution path that will allow it to reach the end of the function body, thus returning without a value. Either insert a return statement with a value, or if the function is not to return a value, declare it void, for example:
int mydiv(double a, int b)
{
    if(b != 0)
        return a/b;   /* what about when b is 0? */
}                 /* warning flagged here */

(344) non-void function returns no value (Parser)

A function that is declared as returning a value has a return statement that does not specify a return value, for example:
int get_value(void)
{
    if(flag)
        return val++;
    return;
    /* what is the return value in this instance? */
}

(345) unreachable code (Parser)

This section of code will never be executed, because there is no execution path by which it could be reached, for example:
while(1)          /* how does this loop finish? */
    process();
flag = FINISHED;  /* how do we get here? */

(346) declaration of “*” hides outer declaration (Parser)

An object has been declared that has the same name as an outer declaration (i.e., one outside and preceding the current function or block). This is legal, but can lead to accidental use of one variable when the outer one was intended, for example:
int input;         /* input has filescope */
void process(int a)
{
    int input;       /* local blockscope input */
    a = input;       /* this will use the local variable. Is this right? */

(347) external declaration inside function (Parser)

A function contains an extern declaration. This is legal but is invariably not desirable as it restricts the scope of the function declaration to the function body. This means that if the compiler encounters another declaration, use, or definition of the extern object later in the same file, it will no longer have the earlier declaration and thus will be unable to check that the declarations are consistent. This can lead to strange behavior of your program or signature errors at link time. It will also hide any previous declarations of the same thing, again subverting the compiler’s type checking. As a general rule, always declare extern variables and functions outside any other functions. For example:
int process(int a)
{
    /* this would be better outside the function */
    extern int away;
    return away + a;
}

(348) auto variable “*” should not be qualified (Parser)

An auto variable should not have qualifiers such as near or far associated with it. Its storage class is implicitly defined by the stack organization. An auto variable can be qualified with static, but it is then no longer auto.

(349) non-prototyped function declaration for “*” (Parser)

A function has been declared using old-style (K&R) arguments. It is preferable to use prototype declarations for all functions, for example:
int process(input)
int input;         /* warning flagged here */
{
}

This would be better written:

int process(int input)
{
}

(350) unused * “*” (from line *) (Parser)

The indicated object was never used in the function or module being compiled. Either this object is redundant, or the code that was meant to use it was excluded from compilation or misspelled the name of the object. Note that the symbols rcsid and sccsid are never reported as being unused.

(352) float parameter coerced to double (Parser)

Where a non-prototyped function has a parameter declared as float, the compiler converts this to a double. This is because the default C type conversion conventions provide that when a floating-point number is passed to a non-prototyped function, it is converted to double. It is important that the function declaration be consistent with this convention, for example:
double inc_flt(f)  /* f will be converted to double */
float f;           /* warning flagged here */
{
    return f * 2;
}

(353) sizeof external array “*” is zero (Parser)

The size of an external array evaluates to zero. This is probably due to the array not having an explicit dimension in the extern declaration.

(354) possible pointer truncation (Parser)

A pointer qualified far has been assigned to a default pointer, or a pointer qualified near, or a default pointer has been assigned to a pointer qualified near. This can result in truncation of the pointer and loss of information, depending on the memory model in use.

(355) implicit signed to unsigned conversion (Parser)

A signed number is being assigned or otherwise converted to a larger unsigned type. Under the ANSI C “value preserving” rules, this will result in the signed value being first sign-extended to a signed number the size of the target type, then converted to unsigned (which involves no change in bit pattern). An unexpected sign extension can occur. To ensure this does not happen, first convert the signed value to an unsigned equivalent, for example:
signed char sc;
unsigned int ui;
ui = sc;    /* if sc contains 0xff, ui will contain 0xffff for example */

will perform a sign extension of the char variable to the longer type. If you do not want this to take place, use a cast, for example:

ui = (unsigned char)sc;

(356) implicit conversion of float to integer (Parser)

A floating-point value has been assigned or otherwise converted to an integral type. This could result in truncation of the floating-point value. A typecast will make this warning go away.
double dd;
int i;
i = dd;    /* is this really what you meant? */

If you do intend to use an expression like this, then indicate that this is so by a cast:

i = (int)dd;

(357) illegal conversion of integer to pointer (Parser)

An integer has been assigned to, or otherwise converted to, a pointer type. This will usually mean that you have used the wrong variable. But if this is genuinely what you want to do, use a typecast to inform the compiler that you want the conversion and the warning will be suppressed. This can also mean that you have forgotten the & address operator, for example:
int * ip;
int i;
ip = i;    /* oops -- did you mean ip = &i ? */

If you do intend to use an expression like this, then indicate that this is so by a cast:

ip = (int *)i;

(358) illegal conversion of pointer to integer (Parser)

A pointer has been assigned to, or otherwise converted to, a integral type. This will usually mean that you have used the wrong variable. But if this is genuinely what you want to do, use a typecast to inform the compiler that you want the conversion and the warning will be suppressed. This can also mean that you have forgotten the * dereference operator, for example:
int * ip;
int i;
i = ip;    /* oops -- did you mean i = *ip ? */

If you do intend to use an expression like this, indicate your intention by a cast:

i = (int)ip;

(359) illegal conversion between pointer types (Parser)

A pointer of one type (i.e., pointing to a particular kind of object) has been converted into a pointer of a different type. This usually means that you have used the wrong variable, but if this is genuinely what you want to do, use a typecast to inform the compiler that you want the conversion and the warning will be suppressed, for example:
long input;
char * cp;
cp = &input;  /* is this correct? */

This is a common way of accessing bytes within a multi-byte variable. To indicate that this is the intended operation of the program, use a cast:

cp = (char *)&input;  /* that’s better */

This warning can also occur when converting between pointers to objects that have the same type, but which have different qualifiers, for example:

char * cp;
/* yes, but what sort of characters? */
cp = "I am a string of characters";

If the default type for string literals is const char *, then this warning is quite valid. This should be written:

const char * cp;
cp = "I am a string of characters";  /* that’s better */

Omitting a qualifier from a pointer type is often disastrous and almost certainly not what you intend.

(360) array index out of bounds (Parser)

An array is being indexed with a constant value that is less than zero, or greater than or equal to the number of elements in the array. This warning will not be issued when accessing an array element via a pointer variable, for example:
int i, * ip, input[10];
i = input[-2];           /* oops -- this element doesn’t exist */
ip = &input[5];
i = ip[-2];              /* this is okay */

(361) function declared implicit int (Parser)

When the compiler encounters a function call of a function whose name is presently undefined, the compiler will automatically declare the function to be of type int, with unspecified (K&R style) parameters. If a definition of the function is subsequently encountered, it is possible that its type and arguments will be different from the earlier implicit declaration, causing a compiler error. The solution is to ensure that all functions are defined (or at least declared) before use, preferably with prototyped parameters. If it is necessary to make a forward declaration of a function, it should be preceded with the keywords extern or static, as appropriate. For example:
/* I can prevent an error arising from calls below */
extern void set(long a, int b);
int main(void)
{
    /* at this point, a prototype for set() has already been seen */
    set(10L, 6);
}

(362) redundant “&” applied to array (Parser)

The address operator & has been applied to an array. Because using the name of an array gives its address anyway, this is unnecessary and has been ignored, for example:
int array[5];
int * ip;
/* array is a constant, not a variable; the & is redundant. */
ip = &array;

(363) redundant “&” or “*” applied to function address (Parser)

The address operator & has been applied to a function. Because using the name of a function gives its address anyway, this is unnecessary and has been ignored, for example:
extern void foo(void);
int main(void)
{
    void(*bar)(void);
    /* both assignments are equivalent */
    bar = &foo;
    bar = foo;  /* the & is redundant */
}

(364) attempt to modify object qualified * (Parser)

Objects declared const or code cannot be assigned to or modified in any other way by your program. The effect of attempting to modify such an object is compiler specific.
const int out = 1234;  /* "out" is read only */
out = 0;               /* oops -- writing to a read-only object */

(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, because 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.
int 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 can 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 could 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’;

(371) missing basic type; int assumed (Parser)

This declaration does not include a basic type, so int has been assumed. This declaration is not illegal, but it is preferable to include a basic type to make it clear what is intended, for example:
char c;
i;      /* don’t let the compiler make assumptions, use : int i */
func(); /* ditto, use: extern int func(int); */

(372) “,” expected (Parser)

A comma was expected here. This could mean you have left out the comma between two identifiers in a declaration list. It can also mean that the immediately preceding type name is misspelled and has been interpreted as an identifier, for example:
unsigned char a;
/* thinks: chat & b are unsigned, but where is the comma? */
unsigned chat b;

(373) implicit signed to unsigned conversion (Parser)

An unsigned type was expected where a signed type was given and was implicitly converted to unsigned, for example:
unsigned int foo = -1;
/* the above initialization is implicitly treated as:
unsigned int foo = (unsigned) -1; */

(374) missing basic type; int assumed (Parser)

The basic type of a cast to a qualified basic type was missing and assumed to be int., for example:
int i = (signed) 2; /* (signed) assumed to be (signed int) */

(375) unknown FNREC type “*” (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(376) bad non-zero node in call graph (Linker)

The linker has encountered a top level node in the call graph that is referenced from lower down in the call graph. This probably means the program has indirect recursion, which is not allowed when using a compiled stack.

(378) can’t create * file “*” (Hexmate)

This type of file could not be created. Is the file, or a file by this name, already in use?

(379) bad record type “*” (Linker)

This is an internal compiler error. Ensure that the object file is a valid object file. Contact Microchip Technical Support with details.

(380) unknown record type (*) (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(381) record “*” too long (*) (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(382) incomplete record: type = *, length = * (Dump, Xstrip)

This message is produced by the dump or xstrip utilities and indicates that the object file is not a valid object file, or that it has been truncated. Contact Microchip Technical Support with details.

(383) text record has length (*) too small (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(384) assertion failed: file *, line *, expression * (Linker, Parser)

This is an internal compiler error. Contact Microchip Technical Support with details.

(387) illegal or too many -G options (Linker)

There has been more than one linker -g option, or the -g option did not have any arguments following. The arguments specify how the segment addresses are calculated.

(388) duplicate -M option (Linker)

The map file name has been specified to the linker for a second time. This should not occur if you are using a compiler driver. If invoking the linker manually, ensure that only one instance of this option is present on the command line.

(389) illegal or too many -O options (Linker)

This linker -o flag is illegal, or another -o option has been encountered. A -o option to the linker must be immediately followed by a filename with no intervening space.

(390) missing argument to -P (Linker)

There have been too many -p options passed to the linker, or a -p option was not followed by any arguments. The arguments of separate -p options can be combined and separated by commas.

(391) missing argument to -Q (Linker)

The -Q linker option requires the machine type for an argument.

(392) missing argument to -U (Linker)

The -U (undefine) option needs an argument.

(393) missing argument to -W (Linker)

The -W option (listing width) needs a numeric argument.

(394) duplicate -D or -H option (Linker)

The symbol file name has been specified to the linker for a second time. This should not occur if you are using a compiler driver. If invoking the linker manually, ensure that only one instance of either of these options is present on the command line.

(395) missing argument to -J (Linker)

The maximum number of errors before aborting must be specified following the -j linker option.

(397) usage: hlink [-options] files.obj files.lib (Linker)

Improper usage of the command-line linker. If you are not invoking the linker directly, this could be an internal compiler error, and you should contact Microchip Technical Support with details.

(398) output file can’t be also an input file (Linker)

The linker has detected an attempt to write its output file over one of its input files. This cannot be done, because it needs to simultaneously read and write input and output files.

(400) bad object code format (Linker)

This is an internal compiler error. The object code format of an object file is invalid. Ensure it is a valid object file. Contact Microchip Technical Support with details.

(402) bad argument to -F (Objtohex)

The -F option for objtohex has been supplied an invalid argument. If you are not invoking this tool directly, this is an internal compiler error, and you should contact Microchip Technical Support with details.

(403) bad -E option: “*” (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(404) bad maximum length value to -<digits> (Objtohex)

The first value to the OBJTOHEX -n,m HEX length/rounding option is invalid.

(405) bad record size rounding value to -<digits> (Objtohex)

The second value to the OBJTOHEX -n,m HEX length/rounding option is invalid.

(406) bad argument to -A (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(407) bad argument to -U (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(408) bad argument to -B (Objtohex)

This option requires an integer argument in either base 8, 10, or 16. If you are not invoking this tool directly, this is an internal compiler error and you should contact Microchip Technical Support with details.

(409) bad argument to -P (Objtohex)

This option requires an integer argument in either base 8, 10, or 16. If you are not invoking this tool directly, this is an internal compiler error and you should contact Microchip Technical Support with details.

(410) bad combination of options (Objtohex)

The combination of options supplied to OBJTOHEX is invalid.

(412) text does not start at 0 (Objtohex)

Code in some things must start at zero. Here it doesn’t.

(413) write error on “*” (Assembler, Linker, Cromwell)

A write error occurred on the named file. This probably means you have run out of disk space.

(414) read error on “*” (Linker)

The linker encountered an error trying to read this file.

(415) text offset too low in COFF file (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(416) bad character (*) in extended TEKHEX line (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(417) seek error in “*” (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(418) image too big (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(419) object file is not absolute (Objtohex)

The object file passed to OBJTOHEX has relocation items in it. This can indicate it is the wrong object file, or that the linker or OBJTOHEX have been given invalid options. The object output files from the assembler are relocatable, not absolute. The object file output of the linker is absolute.

(420) too many relocation items (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(421) too many segments (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(422) no end record (Linker)

This object file has no end record. This probably means it is not an object file. Contact Microchip Technical Support if the object file was generated by the compiler.

(423) illegal record type (Linker)

There is an error in an object file. This is either an invalid object file, or an internal error in the linker. Contact Microchip Technical Support with details if the object file was created by the compiler.

(424) record too long (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(425) incomplete record (Objtohex, Libr)

The object file passed to OBJTOHEX or the librarian is corrupted. Contact Microchip Technical Support with details.

(427) syntax error in list (Objtohex)

There is a syntax error in a list read by OBJTOHEX. The list is read from standard input in response to an option.

(428) too many segment fixups (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(429) bad segment fixups (Objtohex)

This is an internal compiler error. Contact Microchip Technical Support with details.

(430) bad specification (Objtohex)

A list supplied to OBJTOHEX is syntactically incorrect.

(431) bad argument to -E (Objtoexe)

This option requires an integer argument in either base 8, 10, or 16. If you are invoking objtoexe directly then check this argument. Otherwise, this can be an internal compiler error and you should contact Microchip Technical Support with details.

(432) usage: objtohex [-ssymfile] [object-file [exe-file]] (Objtohex)

Improper usage of the command-line tool objtohex. If you are not invoking this tool directly, this is an internal compiler error and you should contact Microchip Technical Support with details.

(434) too many symbols (*) (Linker)

There are too many symbols in the symbol table, which has a limit of * symbols. Change some global symbols to local symbols to reduce the number of symbols.

(435) bad segment selector “*” (Linker)

The segment specification option (-G) to the linker is invalid, for example:
-GA/f0+10

Did you forget the radix?

-GA/f0h+10

(436) psect “*” re-orged (Linker)

This psect has had its start address specified more than once.

(437) missing “=” in class spec (Linker)

A class spec needs an = sign, e.g., -Ctext=ROM.

(438) bad size in -S option (Linker)

The address given in a -S specification is invalid, it should be a valid number, in decimal, octal, or hexadecimal radix. The radix is specified by a trailing O, for octal, or H for HEX. A leading 0x can also be used for hexadecimal. Case in not important for any number or radix. Decimal is the default, for example:
-SCODE=f000

Did you forget the radix?

-SCODE=f000h

(439) bad -D spec: “*” (Linker)

The format of a -D specification, giving a delta value to a class, is invalid, for example:
-DCODE

What is the delta value for this class? Possibly, you meant something like:

-DCODE=2

(440) bad delta value in -D spec (Linker)

The delta value supplied to a -D specification is invalid. This value should an integer of base 8, 10, or 16.

(441) bad -A spec: “*” (Linker)

The format of a -A specification, giving address ranges to the linker, is invalid, for example:
-ACODE

What is the range for this class? Possibly, you meant:

-ACODE=0h-1fffh

(442) missing address in -A spec (Linker)

The format of a -A specification, giving address ranges to the linker, is invalid, for example:
-ACODE=

What is the range for this class? Possibly, you meant:

-ACODE=0h-1fffh

(443) bad low address “*” in -A spec (Linker)

The low address given in a -A specification is invalid: it should be a valid number, in decimal, octal, or hexadecimal radix. The radix is specified by a trailing O (for octal) or H for HEX. A leading 0x can also be used for hexadecimal. Case in not important for any number or radix. Decimal is default, for example:
-ACODE=1fff-3fffh

Did you forget the radix?

-ACODE=1fffh-3fffh

(444) expected “-” in -A spec (Linker)

There should be a minus sign, -, between the high and low addresses in a -A linker option, for example:
-AROM=1000h

Possibly, you meant:

-AROM=1000h-1fffh

(445) bad high address “*” in -A spec (Linker)

The high address given in a -A specification is invalid: it should be a valid number, in decimal, octal, or hexadecimal radix. The radix is specified by a trailing O, for octal, or H for HEX. A leading 0x can also be used for hexadecimal. Case in not important for any number or radix. Decimal is the default, for example:
-ACODE=0h-ffff

Did you forget the radix?

-ACODE=0h-ffffh

(446) bad overrun address “*” in -A spec (Linker)

The overrun address given in a -A specification is invalid: it should be a valid number, in decimal, octal, or hexadecimal radix. The radix is specified by a trailing O (for octal) or H for HEX. A leading 0x can also be used for hexadecimal. Case in not important for any number or radix. Decimal is default, for example:
-AENTRY=0-0FFh-1FF

Did you forget the radix?

-AENTRY=0-0FFh-1FFh

(447) bad load address “*” in -A spec (Linker)

The load address given in a -A specification is invalid: it should be a valid number, in decimal, octal, or hexadecimal radix. The radix is specified by a trailing O (for octal) or H for HEX. A leading 0x can also be used for hexadecimal. Case in not important for any number or radix. Decimal is default, for example:
-ACODE=0h-3fffh/a000

Did you forget the radix?

-ACODE=0h-3fffh/a000h

(448) bad repeat count “*” in -A spec (Linker)

The repeat count given in a -A specification is invalid, for example:
-AENTRY=0-0FFhxf

Did you forget the radix?

-AENTRY=0-0FFhxfh

(449) syntax error in -A spec: * (Linker)

The -A spec is invalid. A valid -A spec should be something like:
-AROM=1000h-1FFFh

(450) psect “*” was never defined, or is local (Linker)

This psect has been listed in a -P option, but is not defined in any module within the program. Alternatively, the psect is defined using the local psect flag, but with no class flag; and, so, cannot be linked to an address. Check the assembly list file to ensure that the psect exists and that it is does not specify the local psect flag.

(451) bad psect origin format in -P option (Linker)

The origin format in a -p option is not a validly formed decimal, octal, or HEX number, nor is it the name of an existing psect. A HEX number must have a trailing H, for example:
-pbss=f000

Did you forget the radix?

-pbss=f000h

(452) bad “+” (minimum address) format in -P option (Linker)

The minimum address specification in the linker’s -p option is badly formatted, for example:
-pbss=data+f000

Did you forget the radix?

-pbss=data+f000h

(453) missing number after “%” in -P option (Linker)

The % operator in a -p option (for rounding boundaries) must have a number after it.

(454) link and load address can’t both be set to “.” in -P option (Linker)

The link and load address of a psect have both been specified with a dot character. Only one of these addresses can be specified in this manner, for example:
-Pmypsect=1000h/.
-Pmypsect=./1000h

Both of these options are valid and equivalent. However, the following usage is ambiguous:

-Pmypsect=./.

What is the link or load address of this psect?

(455) psect “*” not relocated on 0x* byte boundary (Linker)

This psect is not relocated on the required boundary. Check the relocatability of the psect and correct the -p option if necessary.

(456) psect “*” not loaded on 0x* boundary (Linker)

This psect has a relocatability requirement that is not met by the load address given in a -p option. For example, if a psect must be on a 4K byte boundary, you could not start it at 100H.

(459) remove failed; error: *, * (Xstrip)

The creation of the output file failed when removing an intermediate file.

(460) rename failed; error: *, * (Xstrip)

The creation of the output file failed when renaming an intermediate file.

(461) can’t create * file “*” (Assembler, Code Generator)

This is an internal compiler error. Contact Microchip Technical Support with details.

(464) missing key in avmap file (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(465) undefined symbol “*” in FNBREAK record (Linker)

The linker has found an undefined symbol in the FNBREAK record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(466) undefined symbol “*” in FNINDIR record (Linker)

The linker has found an undefined symbol in the FNINDIR record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(467) undefined symbol “*” in FNADDR record (Linker)

The linker has found an undefined symbol in the FNADDR record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(468) undefined symbol “*” in FNCALL record (Linker)

The linker has found an undefined symbol in the FNCALL record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(469) undefined symbol “*” in FNROOT record (Linker)

The linker has found an undefined symbol in the FNROOT record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(470) undefined symbol “*” in FNSIZE record (Linker)

The linker has found an undefined symbol in the FNSIZE record for a non-reentrant function. Contact Microchip Technical Support if this is not handwritten assembler code.

(471) recursive function calls: (Linker)

These functions (or function) call each other recursively. One or more of these functions has statically allocated local variables (compiled stack). Either use the reentrant keyword (if supported with this compiler) or recode to avoid recursion, for example:
int test(int a)
{
    if(a == 5) {
    /* recursion cannot be supported by some compilers */
        return test(a++);
     }
    return 0;
}

(472) non-reentrant function “*” appears in multiple call graphs: rooted at “*” and “*”
 (Linker)

This function can be called from both main-line code and interrupt code. Use the reentrant keyword, if this compiler supports it, or recode to avoid using local variables or parameters, or duplicate the function, for example:
void interrupt my_isr(void)
{
    scan(6);     /* scan is called from an interrupt function */
}
void process(int a)
{
    scan(a);     /* scan is also called from main-line code */
}

(473) function “*” is not called from specified interrupt_level (Linker)

The indicated function is never called from an interrupt function of the same interrupt level, for example:
#pragma interrupt_level 1
void foo(void)
{
    ...
}
#pragma interrupt_level 1
void interrupt bar(void)
{
    // this function never calls foo()
}

(474) no psect specified for function variable/argument allocation (Linker)

The FNCONF assembler directive which specifies to the linker information regarding the auto/parameter block was never seen. This is supplied in the standard runtime files if necessary. This error can imply that the correct run-time startup module was not linked. Ensure you have used the FNCONF directive if the runtime startup module is hand-written.

(475) conflicting FNCONF records (Linker)

The linker has seen two conflicting FNCONF directives. This directive should be specified only once and is included in the standard runtime startup code which is normally linked into every program.

(476) fixup overflow referencing * * (location 0x* (0x*+*), size *, value 0x*) (Linker)

The linker was asked to relocate (fixup) an item that would not fit back into the space after relocation. See the following error message (1356) for more information.

(477) fixup overflow in expression (location 0x* (0x*+*), size *, value 0x*) (Linker)

The linker was asked to relocate (fixup) an item that would not fit back into the space after relocation. See the following error message (1356) for more information.

(478) * range check failed (location 0x* (0x*+*), value 0x* > limit 0x*) (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(479) circular indirect definition of symbol “*” (Linker)

The specified symbol has been equated to an external symbol which, in turn, has been equated to the first symbol.

(480) function signatures do not match: * (*): 0x*/0x* (Linker)

The specified function has different signatures in different modules. This means it has been declared differently; i.e., it can have been prototyped in one module and not another. Check what declarations for the function are visible in the two modules specified and make sure they are compatible, for example:
extern int get_value(int in);
/* and in another module: */
/* this is different to the declaration */
int get_value(int in, char type)
{

(481) common symbol “*” psect conflict (Linker)

A common symbol has been defined to be in more than one psect.

(482) symbol “*” is defined more than once in “*” (Assembler)

This symbol has been defined in more than one place. The assembler will issue this error if a symbol is defined more than once in the same module, for example:
_next:
    MOVE r0, #55
    MOVE [r1], r0
_next:           ; oops -- choose a different name

The linker will issue this warning if the symbol (C or assembler) was defined multiple times in different modules. The names of the modules are given in the error message. Note that C identifiers often have an underscore prepended to their name after compilation.

(483) symbol “*” can’t be global (Linker)

This is an internal compiler error. Contact Microchip Technical Support with details.

(484) psect “*” can’t be in classes “*” and “*” (Linker)

A psect cannot be in more than one class. This is either due to assembler modules with conflicting class= options to the PSECT directive, or use of the -C option to the linker, for example:
psect final,class=CODE
finish:
    /* elsewhere: */
psect final,class=ENTRY

(485) unknown “with” psect referenced by psect “*” (Linker)

The specified psect has been placed with a psect using the psect with flag. The psect it has been placed with does not exist, for example:
psect starttext,class=CODE,with=rext
; was that meant to be with text?

(486) psect “*” selector value redefined (Linker)

The selector value for this psect has been defined more than once.

(487) psect “*” type redefined: */* (Linker)

This psect has had its type defined differently by different modules. This probably means you are trying to link incompatible object modules, i.e., linking 386 flat model code with 8086 real mode code.

(488) psect “*” memory space redefined: */* (Linker)

A global psect has been defined in two different memory spaces. Either rename one of the psects or, if they are the same psect, place them in the same memory space using the space psect flag, for example:
psect spdata,class=RAM,space=0
    ds 6
; elsewhere:
psect spdata,class=RAM,space=1

(489) psect “*” memory delta redefined: */* (Linker)

A global psect has been defined with two different delta values, for example:
psect final,class=CODE,delta=2
finish:
; elsewhere:
psect final,class=CODE,delta=1

(490) class “*” memory space redefined: */* (Linker)

A class has been defined in two different memory spaces. Either rename one of the classes or, if they are the same class, place them in the same memory space.

(491) can’t find 0x* words for psect “*” in segment “*” (Linker)

One of the main tasks the linker performs is positioning the blocks (or psects) of code and data that is generated from the program into the memory available for the target device. This error indicates that the linker was unable to find an area of free memory large enough to accommodate one of the psects. The error message indicates the name of the psect that the linker was attempting to position and the segment name which is typically the name of a class which is defined by a -A linker option issued by the compiler driver. Typically psect names which are, or include, text relate to program code. Names such as bss or data refer to variable blocks. This error can be due to two reasons.

First, the size of the program or the program’s data has exceeded the total amount of space on the selected device. In other words, some part of your device’s memory has completely filled. If this is the case, then the size of the specified psect must be reduced.

The second cause of this message is when the total amount of memory needed by the psect being positioned is sufficient, but that this memory is fragmented in such a way that the largest contiguous block is too small to accommodate the psect. The linker is unable to split psects in this situation. That is, the linker cannot place part of a psect at one location and part somewhere else. Thus, the linker must be able to find a contiguous block of memory large enough for every psect. If this is the cause of the error, then the psect must be split into smaller psects if possible.

To find out what memory is still available, generate and look in the map file. Search for the string UNUSED ADDRESS RANGES. Under this heading, look for the name of the segment specified in the error message. If the name is not present, then all the memory available for this psect has been allocated. If it is present, there will be one address range specified under this segment for each free block of memory. Determine the size of each block and compare this with the number of words specified in the error message.

Psects containing code can be reduced by using all the compiler’s optimizations, or restructuring the program. If a code psect must be split into two or more small psects, this requires splitting a function into two or more smaller functions (which can call each other). These functions can need to be placed in new modules.

Psects containing data can be reduced when invoking the compiler optimizations, but the effect is less dramatic. The program can need to be rewritten so that it needs less variables. If the default linker options must be changed, this can be done indirectly through the driver using the driver -Wl, option. If a data psect cannot be positioned, then you typically need to reduce the total size of variables being used.

For example, after receiving the message:

Can’t find 0x34 words (0x34 withtotal) for psect text in segment CODE (error)

look in the map file for the ranges of unused memory.

UNUSED ADDRESS RANGES
CODE             00000244-0000025F
                 00001000-0000102f
RAM              00300014-00301FFB

In the CODE segment, there is 0x1c (0x25f-0x244+1) bytes of space available in one block and 0x30 available in another block. Neither of these are large enough to accommodate the psect text which is 0x34 bytes long. Notice that the total amount of memory available is larger than 0x34 bytes. If the function that is encoded into the text psect can be split into two smaller functions, there is a chance the program will link correctly.

(492) attempt to position absolute psect “*” is illegal (Linker)

This psect is absolute and should not have an address specified in a -P option. Either remove the abs psect flag, or remove the -P linker option.

(493) origin of psect “*” is defined more than once (Linker)

The origin of this psect is defined more than once. There is most likely more than one -p linker option specifying this psect.

(494) bad -P format “*/*” (Linker)

The -P option given to the linker is malformed. This option specifies placement of a psect, for example:
-Ptext=10g0h

Possibly, you meant:

-Ptext=10f0h

(495) use of both “with=” and “INCLASS/INCLASS” allocation is illegal (Linker)

It is not legal to specify both the link and location of a psect as within a class, when that psect was also defined using a with psect flag.

(497) psect “*” exceeds max size: *h > *h (Linker)

The psect has more bytes in it than the maximum allowed as specified using the size psect flag.

(498) psect “*” exceeds address limit: *h > *h (Linker)

The maximum address of the psect exceeds the limit placed on it using the limit psect flag. Either the psect needs to be linked at a different location or there is too much code/data in the psect.

(499) undefined symbol: (Assembler, Linker)

The symbol following is undefined at link time. This could be due to spelling error, or failure to link an appropriate module.