...
Code Block | ||
---|---|---|
| ||
int x = 50; int y = x << 2; yx += y + 1; |
This example is noncompliant because the actual data has both bitwise and arithmetic operations performed on it, even though the operations are performed on different variables.
...
Related Guidelines
INT14-C. Avoid performing bitwise and arithmetic operations on the same data | |
INT14-CPP. Avoid performing bitwise and arithmetic operations on the same data |
Bibliography
...