MISRAC2012-Rule-20.11
In this section:
Synopsis
(Required) A macro parameter immediately following a # operator shall not immediately be followed by a ## operator.
Enabled by default
Yes
Severity/Certainty
Medium/Medium

Full description
A macro parameter immediately following a # was found that is immediately followed by a ##.
Note: This check is not part of C-STAT® but detected by the IAR compiler.
Coding standards
- MISRA C:2012 Rule-20.11
(Required) A macro parameter immediately following a # operator shall not immediately be followed by a ## operator
Code examples
The following code example fails the check and will give a warning:
#define AAA( a, b ) #a ## b #define BBB 1 #define CCC( a, b ) BBB + ( #a ## b )
The following code example passes the check and will not give a warning about this issue:
#define AAA( a ) #a #define BBB( a, b ) a ## b