...
Non-Compliant Code Example
The following C expression, intended intent of the expression in this non-compliant code example is to test the least significant bit of x
.
However, it Because of operator precedence rules, the expression is parsed as
which the compiler would probably evaluate at compile time evaluates to
and then to 0.
Compliant Solution
Adding parentheses to indicate precedence will cause the expression to evaluate In this compliant solution, parentheses are used to ensure the expression evaluates as expected.
...