Skip to main content

IAR Embedded Workbench for RL78 5.20

MISRAC2004-5.1

In this section:
Synopsis

(Required) Identifiers (internal and external) shall not rely on the significance of more than 31 characters.

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

Identifiers were found that are not distinct in their first 31 characters (#defines, structs, unions, fields, enums, and variables).

Coding standards
MISRA C:2004 5.1

(Required) Identifiers (internal and external) shall not rely on the significance of more than 31 characters.

Code examples

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


int long_identifier_name_123456789012345678901234567890;
int long_identifier_name_123456789012345678901234567891;
int long_identifier_name_123456789012345678901234567892;

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


int long_identifier_name;
int long_identifier_namb;