| ??? 06/24/07 21:38 Read: times |
#141200 - splint gives a (very) detailed warning: Responding to: ???'s previous message |
Running splint ( http://www.splint.org ) over this code:
---8<----------------------
unsigned char x,y;
void main(void)
{
x^=y^=x^=y;
}
--->8----------------------results in this message:
xy.c:5:6: Expression has undefined behavior (value of left operand x is
modified by right operand y ^= x ^= y): x ^= y ^= x ^= y
Code has unspecified behavior. Order of evaluation of function parameters or
subexpressions is not defined, so if a value is used and modified in
different places not separated by a sequence point constraining evaluation
order, then the result of the expression is unspecified. (Use -evalorder to
inhibit warning)
Ooops, I'm surprised as I did not even hope for such a detailed message!) |



