[previous] 0341 [next] Using the stringify operator '#'.
K+R compatibility REFERENCE - ISO:C90-6.8.3.2 The # Operator

The '#' preprocessing operator (sometimes referred to as the stringify operator) has been used in the definition of a macro. This was not supported in early versions of the C language.

Be aware that message 0341 is only generated when the "-k+r s" option is enabled.

For example:


/*PRQA S 553,2017,3429 ++*/
/*****************************
 * OPTIONS: -k+r s
 ****************************/

#define STRINGIFY(A) #A                /* Message 0341 */



MISRA C:2012 Rules applicable to message 0341:

Rule-20.10  (Advisory) The # and ## preprocessor operators should not be used


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