Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Rule 0-1-7The value returned by a function having non-void return type that is not an overloaded operator shall always be used.
Rule 2-13-2Octal constants (other than zero) and octal escape sequences (other than "\0") shall not be used.
Rule 2-13-3A "U" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type.
Rule 2-13-4Literal suffixes shall be upper case.
Rule 3-1-2Functions shall not be declared at block scope.
Rule 3-1-3When an array is declared, its size shall either be stated explicitly or defined implicitly by initialization.
Rule 4-5-1Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator =, the logical operators &&, ||, !, the equality operators == and !=, the unary & operator, and the conditional operator.
Rule 4-5-2Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=.
Rule 4-10-2Literal zero (0) shall not be used as the null-pointer-constant.
Rule 5-0-5There shall be no implicit floating-integral conversions.
Rule 5-0-19The declaration of objects shall contain no more than two levels of pointer indirection.
Rule 5-2-4C-style casts (other than void casts) and functional notation casts (other than explicit constructor calls) shall not be used.
Rule 5-2-5A cast shall not remove any const or volatile qualification from the type of a pointer or reference.
Rule 5-2-10The increment (++) and decrement (–) operators should not be mixed with other operators in an expression.
Rule 5-2-11The comma operator, && operator and the || operator shall not be overloaded.
Rule 5-8-1The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand.
Rule 5-18-1The comma operator shall not be used.
Rule 6-2-1Assignment operators shall not be used in sub-expressions.
Rule 6-4-2All if ... else if constructs shall be terminated with an else clause.
Rule 6-4-6The final clause of a switch statement shall be the default-clause.
Rule 6-4-8Every switch statement shall have at least one case-clause.
Rule 6-6-2The goto statement shall jump to a label declared later in the same function body.
Rule 7-4-3Assembly language shall be encapsulated and isolated.
Rule 9-5-1Unions shall not be used.
Rule 9-6-2Bit-fields shall be either bool type or an explicitly unsigned or signed integral type.
Rule 10-3-2Each overriding virtual function shall be declared with the virtual keyword.