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

SR:  9.2#2Checked automatically with code checker

Synopsis:A null statement, if used, shall appear on a line by itself.
Severity Level:6

An extra semicolon can easily be overlooked so it is advisable to make it as noticeable as possible. Note that since all selection and iteration statements should have a compound statement as the body, a null body should be written as { } suitably indented. The other use for a null statement is to carry a label before a closing brace, but gotos are prohibited by this Standard so such null statements are, by implication, also prohibited.


if ( ... ); /* WRONG - ; on end hardly visible */
if ( ... ) /* RIGHT - obvious */
    /* EMPTY*/