Rule 2.1 has an Exception. - 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:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21) +---- Forum: 8.2 Unused code (https://forum.misra.org.uk/forumdisplay.php?fid=157) +---- Thread: Rule 2.1 has an Exception. (/showthread.php?tid=1015) |
Rule 2.1 has an Exception. - ogawa.kiyoshi - 13-01-2014 In rule 2.1, Note: "code that has been conditionally excluded by pre-processor directives is not subject to this rule as it is not presented to the later phases of translation.". I think this statement may be "Exception". Do you think so? Re: Rule 2.1 has an Exception. - misra-c - 16-01-2014 The MISRA C:2012 guidelines define “code†in the Glossary as Quote:Code consists of everything within a translation unit that is not excluded by conditional compilationTherefore, all guidelines apply to code after preprocessing directives have been executed, unless otherwise stated in a guideline. This includes rule 2.1, and the note has only been added to clarify the situation for the user who may not be aware of the definition in the glossary. |