Skip to main content

IAR Embedded Workbench for RL78 5.20

MISRAC2012-Rule-8.14

In this section:
Synopsis

(Required) The restrict type qualifier shall not be used.

Enabled by default

Yes

Severity/Certainty

Medium/Medium

mediummedium.png
Full description

The restrict type qualifier was found used in function parameters.

Coding standards
MISRA C:2012 Rule-8.14

(Required) The restrict type qualifier shall not be used

Code examples

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

void example(void * restrict p, void * restrict q, int n) {
  printf("Bad function!\n");
}

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

void example(void * p, void * q, int n) {
  printf("Bad function!\n");
}