Synopsis: | To clarify the actual test performed in an iteration statement, there should be an explicit comparison operator. |
Language: | C |
Severity Level: | 8 |
Category: | STATEMENTS |
Description: |
Implicit actions on behalf of an implementation are to be avoided for the sake of clarity. Modern compilers will optimise a comparison against zero in any case, defeating any arguments of efficiency. An exception to this rule concerns the use of an infinite while loop: Example: while (1) { ... } |