Download Manual - IS MU
Transcript
Error and Warning Messages
(762)
constant truncated when assigned to bitfield
(Code Generator)
A constant value is too large for a bitfield structure member to which it is being assigned, e.g.
struct INPUT {
unsigned a : 3;
unsigned b : 5;
} input_grp;
input_grp.a = 0x12;
/* 12h cannot fit into a 3-bit wide object */
(763)
constant left operand to "? :" operator
(Code Generator)
The left operand to a conditional operator ? is constant, thus the result of the tertiary operator ?:
will always be the same, e.g.:
a = 8 ? b : c;
(764)
/* this is the same as saying a = b; */
mismatched comparison
(Code Generator)
A comparison is being made between a variable or expression and a constant value which is not in
the range of possible values for that expression, e.g.:
unsigned char c;
if(c > 300)
/* oops -- how can this be true? */
close();
(765)
degenerate unsigned comparison
(Code Generator)
There is a comparison of an unsigned value with zero, which will always be true or false, e.g.:
unsigned char c;
if(c >= 0)
will always be true, because an unsigned value can never be less than zero.
(766)
degenerate signed comparison
(Code Generator)
There is a comparison of a signed value with the most negative value possible for this type, such
that the comparison will always be true or false, e.g.:
char c;
if(c >= -128)
will always be true, because an 8 bit signed char has a maximum negative value of -128.
443