MISRAC2004-19.13
In this section:
Synopsis
(Advisory) The # and ## preprocessor operators should not be used.
Enabled by default
No
Severity/Certainty
Low/Low

Full description
Uses were found of the # and ## operators. This check is identical to MISRAC++2008-16-3-2, MISRAC2012-Rule-20.10, MISRAC++2023-19.3.1.
Coding standards
- MISRA C:2012 Rule-20.10
(Advisory) The # and ## preprocessor operators should not be used
- MISRA C++ 2008 16-3-2
(Advisory) The # and ## operators should not be used.
- MISRA C++ 2023 19.3.1
(Advisory) The # and ## preprocessor operators should not be used
Code examples
The following code example fails the check and will give a warning:
#define A(Y) #Y /* Non-compliant */
The following code example passes the check and will not give a warning about this issue:
#define A(x) (x) /* Compliant */