Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC++2023-5.13.5

In this section:
Synopsis

(Required) The lowercase form of L shall not be used as the first character in a literal suffix

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

The lower case character l was found used as a suffix on numeric constants. This check is identical to MISRAC2012-Rule-7.3.

Coding standards
MISRA C:2012 Rule-7.3

(Required) The lowercase character "l" shall not be used in a literal suffix

Code examples

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

void func()
{
  const int b = 0l;
}

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

void func()
{
  const int a = 0L;
}