Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8.9 and macros
#3
I know it's legal. MISRA rules forbid many legal C constructs for good reasons.
The problem occurs when the same macro is defined in 2 header files for example.
This poses a maintenance headache which can lead to future errors and thus I think should not be allowed.
This (I think) is the rationale behind rule 8.9. The problem is that that a macro has no linkage and is thus not covered by rule 8.9!
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)