TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

Guideline:  9.5#1Checked automatically with code checker

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) {
  ...
}