Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC++2023-5.10.1 (C++ only)

In this section:
Synopsis

(Required) User-defined identifiers shall have an appropriate form

Enabled by default

Yes

Severity/Certainty

Medium/Medium

mediummedium.png
Full description

Found a conflicting or illformed identifier

Coding standards

This check does not correspond to any coding standard rules.

Code examples

The following code example fails the check and will give a warning:

void example() {
  #define Add_1(x, y) (x + y) // Non-compliant, macro must match [A-Z_0-9]+
  int x__y = 5; // Double underscrores are not allowed
}

The following code example passes the check and will not give a warning about this issue:

void example() {
  #define ADD_1(x, y) (x + y) // Compliant
  int x_y = 5;                // Compliant
}