[previous] MISRA-C:2004  Rule  19.6:  (Required) [next] #undef shall not be used.
#undef should not normally be needed. Its use can lead to confusion with respect to the existence or meaning of a macro when it is used in the code.

Example Code:


#include "misra.h"
#include "m2cmex.h"

#define  L      0
#undef   L              /* MISRA Violation */

extern S16 test_1906( void )
{
   return 1;
}


QAC messages that encompass this guideline:

0841 Using '#undef'.



(c) The Motor Industry Research Association, 2004
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents