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

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 388
 2012 Microchip Technology Inc.
(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
 may not 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 = ∈     
  /* oops -- in may not 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 mem-
ory storage (“an lvalue”) and therefore its address can not be defined, for example:
ip = &8;  /* oops -- you can’t take the address of a literal */
(202) only lvalues may 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 isn’t a variable,
                 it can’t 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 */