int main ()
{
int a = 5,b = 2;
printf(\"%d\",a+++++b);
return 0;
}
This code gives the following error:
error: lval
I think the compiler sees it as
c = ((a++)++)+b
++
has to have as an operand a value that can be modified. a is a value that can be modified. a++
however is an 'rvalue', it cannot be modified.
By the way the error I see on GCC C is the same, but differently-worded: lvalue required as increment operand
.