MISRAC2004-19.12
In this section:
Synopsis
(Required) There shall be at most one occurrence of the # or ## preprocessor operators in a single macro definition.
Enabled by default
Yes
Severity/Certainty
Medium/Low

Full description
Multiple # or ## preprocessor operators were found in a macro definition. This check is identical to DEFINE-hash-multiple, MISRAC++2008-16-3-1.
Coding standards
- MISRA C:2004 19.12
(Required) There shall be at most one occurrence of the # or ## preprocessor operators in a single macro definition.
- MISRA C++ 2008 16-3-1
(Required) There shall be at most one occurrence of the # or ## operators in a single macro definition.
Code examples
The following code example fails the check and will give a warning:
#define C(x, y) # x ## y /* Non-compliant */
The following code example passes the check and will not give a warning about this issue:
#define A(x) #x /* Compliant */