MISRA Discussion Forums
Rule 15.0 - Required or Adviosry? - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17)
+---- Forum: 6.15 Switch Statements (https://forum.misra.org.uk/forumdisplay.php?fid=45)
+---- Thread: Rule 15.0 - Required or Adviosry? (/showthread.php?tid=684)



Rule 15.0 - Required or Adviosry? - William Forbes - 24-10-2009

TC1 introduced the concept of rule 15.0.
However it does not explicitly state if this rule is "Required" or "Advisory"
Is rule 15.0 "required" or "advisory"?


Re: Rule 15.0 - Required or Adviosry? - jbezem - 27-10-2009

IMHO, specifying the preamble text as rule "15.0" is somewhat confusing. I would suggest to change its wording to clearly identify the preamble to be a rule.
At the same time, the wording is clear: "... the syntax for switch statements as defined by MISRA-C and is normative". To me this means that 15.0 is required, possibly even stronger than normal 'required' rules. In my own responsibility, I would not allow deviations from rule 15.0, not even when commented heavily or using a genarlly accepted deviation procedure.
If such a deviation seems necessary, other contsructs (like chained if ... else if ... else) might be better suited for the occasion.

Best regards,

Johan


Re: Rule 15.0 - Required or Adviosry? - misra-c - 10-11-2009

Rule 15.0 is required although this is not explicitly stated in TC1. Note that edition 2 of the MISRA-C:2004 Guidelines, which incorporates TC1, is explicit that the rule is required.


Re: Rule 15.0 - Required or Adviosry? - jbezem - 10-11-2009

Clarification required, please:
Does this mean that edition 2 is more than the sum of edition 1 + TC1? So if I bought ed.1 and downloaded TC1, I still have less than ed.2?
Is an overview of the additional changes available separately?

TIA,

Johan Bezem


Re: Rule 15.0 - Required or Adviosry? - misra-c - 20-11-2009

TC1 made all "supporting text" normative. The introductory text to Rules 15.x was made into Rule 15.0 in TC1. When the reprint of MISRA C2, and the corresponding PDF version, were prepared the text was more closely integrated including giving Rule 15.0 a title "The MISRA C switch syntax shall be used".

While there may be some minor editorial differences between edition 1 + TC1 and edition 2, the content is essentially the same.