13-02-2015, 09:57 AM
The MISRA guidelines define "code" in the Glossary as
In this example, “x†is excluded by the conditional compilation in “fn2†and therefore only appears in “fn1â€. Hence the code is not compliant with rule 8.9.
Quote:Code consists of everything within a translation unit that is not excluded by conditional compilation.Therefore, the guidelines apply to code after preprocessing directives have been executed, unless otherwise stated in a guideline.
In this example, “x†is excluded by the conditional compilation in “fn2†and therefore only appears in “fn1â€. Hence the code is not compliant with rule 8.9.
Posted by and on behalf of the MISRA C Working Group