Skip to main content

IAR Embedded Workbench for Arm 9.70.x

MISRAC++2023-19.3.1

In this section:
Synopsis

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

Enabled by default

No

Severity/Certainty

Low/Low

lowlow.png
Full description

# and ## operators were found in macro definitions. This check is identical to MISRAC++2008-16-3-2, MISRAC2004-19.13, MISRAC2012-Rule-20.10.

Coding standards
MISRA C:2004 19.13

(Advisory) The # and ## preprocessor operators should not be used.

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.

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 */