Notice that the first assignment will evaluate to true thus the second assignment will not be processed because || has short circuit evaluation.
No, the compiler doesn't parse it like that. You are looking at it as if it is parsed as:
if ((temp = -1) || (temp1 = -1 )) {
But the compiler sees it as one assignment statement with a syntax error.
if (temp = ( -1 || temp1 = -1 )) {
It finds that it can't turn "-1 || temp1" into an lvalue and spits out an error message.
This, for example, is legal and will compile and is essentially what the compiler was expecting:
if(temp = temp1 = -1){
Pete