Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC++2008-16-3-1

In this section:
Synopsis

(Required) There shall be at most one occurrence of the # or ## operators in a single macro definition.

Enabled by default

Yes

Severity/Certainty

Medium/Low

mediumlow.png
Full description

There are multiple # or ## operators in a macro definition. This check is identical to DEFINE-hash-multiple, MISRAC2004-19.12.

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.

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