The CHECK_MISRA Pragma

The CHECK_MISRA pragma enables/disables MISRA C:2004 rules at the source level. The compiler option --check_misra must be used to enable checking in order for this pragma to function at the source level.

The syntax of the pragma in C is:

#pragma CHECK_MISRA (" {all|required|advisory|none|rulespec} ")

The rulespec parameter is a comma-separated list of rule numbers. See Section 7.3 for details.

The RESET_MISRA pragma can be used to reset any CHECK_MISRA pragmas; see Section 7.9.30.