This rule is Obsolete | |
Synopsis: | Avoid using shift operations instead of arithmetic operations |
Language: | C++ |
Severity Level: | 9 |
Category: | Portability |
Description: |
It depends on the compiler and platform (e.g. integer memory representation) whether the result of shift operations are the same as the comparable arithmetic operations. nCount <<= 1; // Multiplied by 2 or not? nCount *= 2; // Preferred. |
Literature References: |
Ellemtel P. Rec. 17 |