14-06-2017, 08:18 AM
Rule 19.4 only permits a macro that expands to a single "type qualifier". i.e. "const" or "volatile". Therefore the above example violates rule 19.4
However, it should be noted that this rule was relaxed in MISRA C:2012 and the above example would not violate MISRA C:2012 rules. If you are continuing to use MISRA-C:2004, then the justification for a deviation for this code could include that this Rule has been relaxed for MISRA C:2012.
However, it should be noted that this rule was relaxed in MISRA C:2012 and the above example would not violate MISRA C:2012 rules. If you are continuing to use MISRA-C:2004, then the justification for a deviation for this code could include that this Rule has been relaxed for MISRA C:2012.
Posted by and on behalf of the MISRA C Working Group