[previous] MISRA-C:2004  Rule  15.4:  (Required) [next] A switch expression shall not represent a value that is effectively Boolean.
See 'Boolean expressions' in the glossary.

For example:

switch ( x == 0 )          /* not compliant - effectively Boolean */
{
   ...


QAC messages that encompass this guideline:

0735 Using relational or logical operators in a 'switch' expression is usually a programming error.



(c) The Motor Industry Research Association, 2004
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents