Skip to main content

IAR Embedded Workbench for Arm 9.70.x

MISRAC2012-Rule-20.5

In this section:
Synopsis

(Advisory) #undef should not be used

Enabled by default

No

Severity/Certainty

Low/Low

lowlow.png
Full description

Found occurrances of #undef. This check is identical to MISRAC2004-19.6, MISRAC++2008-16-0-3.

Coding standards
MISRA C:2004 19.6

(Required) #undef shall not be used.

MISRA C:2012 Rule-20.5

(Advisory) #undef should not be used

MISRA C++ 2008 16-0-3

(Required) #undef shall not be used.

Code examples

The following code example fails the check and will give a warning:

#define SYM
#undef SYM

The following code example passes the check and will not give a warning about this issue:

#define SYM