04-04-2008, 08:22 AM
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!
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>