Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8.8 Does this apply to after pre-processing
#2
The MISRA guidelines define "code" in the Glossary as
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)