Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 394
 2012 Microchip Technology Inc.
(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 state-
ment. This may 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 has not been ended with a closing brace. This probably means that 
a closing brace has been omitted from somewhere in the previous function, although it 
may well 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;
}
MESSAGES 250-499
(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);
}