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

製品コード
SW006021-1
ページ / 518
Error and Warning Messages
 2012 Microchip Technology Inc.
DS52053B-page 393
(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 shouldn’t be here and closed the switch */
    break;     /* this should be inside the switch */
(244) "default" case redefined 
(Parser)
There is only allowed to be one default label 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 state-
ment. A default label is only legal inside the body of a switch statement.
If there is a switch statement before this default label, there may be one too many 
closing braces in the switch code which 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 may only appear inside the body of a switch statement.
If there is a switch statement before this case label, there may be one too many clos-
ing braces in the switch code which 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 */