Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual
Product codes
SW006021-1
Error and Warning Messages
2012 Microchip Technology Inc.
DS52053B-page 401
(310) "]" expected
(Parser)
A closing square bracket was expected in an array declaration or an expression using
an array index, for example:
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:
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:
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.
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 may be the result of a function defini-
tion missing the opening brace , for example:
tion 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 may be the result of a initialized array
missing the closing brace , for example:
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
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:
example:
asm(nop); /* that should be asm("nop");