Unclear Whether && and || Operators Used In Conditional Compilation Blocks are Short Circuit
Closed this issue · 1 comments
Location
Description
In the Conditional Compilation Block subsection, there is a paragraph:
You can combine and negate compilation conditions using the logical operators &&, ||, and ! and use parentheses for grouping. These operators have the same associativity and precedence as the logical operators that are used to combine ordinary Boolean expressions.
When the && and || operators are used in an ordinary Boolean expression, they also are short-circuit operators, that is, depending on how the left-hand operand is evaluated, the right-hand operand need not be evaluated. Given the above text, it is unclear whether this also applies to these operators in this context.
Correction
Explicitly indicate whether these operators are short-circuit in this context by appending one of the two following sentences to the aforementioned paragraph:
As with ordinary Boolean expressions, the && and || operators use short-circuit evaluation.
Unlike ordinary Boolean expressions, the && and || operators don't use short-circuit evaluation.
It doesn't matter or not due to the nature of the conditions being evaluated and that this occurs at compile time, not runtime.