Skip to main content

IAR Embedded Workbench for RL78 5.20

MISRAC++2023-7.0.6_b (C++ only)

In this section:
Synopsis

(Required) Assignment between numeric types shall be appropriate

Enabled by default

Yes

Severity/Certainty

Medium/Low

mediumlow.png
Full description

Inappropriate implicit argument cast found

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(int x) {
  example('c');
}

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

void example(unsigned int n) {
  example(30u);
}