OSDN Git Service
Fix short-circuiting in preprocessor.
The 2nd operand in a logical and ('&&') operation is evaluated if and only if
the 1st operand evaluates to non-zero. The 2nd operand in a logical or ('||')
operation is evaluated if and only if the 1st operand evaluates to zero.
If an operand is not evaluated, the presence of undefined identifiers in the
operand will not cause an error.
Integer overflow in short-circuited expressions are still and error because
it is part of lexical analysis.
Change-Id: I6ff5e0e9874551d2e40ab4e4ad34dc36cfa703e5
Reviewed-on: https://swiftshader-review.googlesource.com/5020
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>