[previous] 0841 [next] Using '#undef'.
Preprocessing REFERENCE - ISO:C90-6.8.3.5 Scope of Macro Definitions

#undef has been used to undefine a macro.

Some programming standards prohibit the use of #undef. The use of #undef can inhibit readability and comprehension, especially through header includes.

For example:


/*PRQA S 2017,3211,3408 ++*/

#define MAC 5

int x = MAC;

#undef MAC                      /* Message 0841 */


MISRA-C:2004 Rules applicable to message 0841:

Rule  19.6  (Required) #undef shall not be used.


See also:

QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents