-Xmisra2004 [Professional Edition only]


This option checks source code against the MISRA-C:2004 rules.

[Specification format]

-Xmisra2004=item[=value]

 

-

Interpretation when omitted

The source code is not checked against the MISRA-C:2004 rules.

[Detailed description]

-

This option checks source code against the MISRA-C:2004 rules.
A message is output if the item specified for the check is item.

-

This option cannot be specified simultaneously with the -Xmisra2012 option.

-

The items that can be specified as item are shown below.
An error will occur if any other item is specified.

Check Item (item)

Parameter (value)

Description

all

None

The source code is checked against all of the rules which are supported.

apply

num[,num]...

The source code is checked against the rules with the numbers specified by num among the rules which are supported.

ignore

num[,num]...

The source code is checked against the rules with the numbers that are not specified by num among the rules which are supported.

required

None

The source code is checked against the rules of the "required" type among the rules which are supported.

required_add

num[,num]...

The source code is checked against the rules of the "required" type and the rules with the numbers specified by num among the rules which are supported.

required_remove

num[,num]...

The source code is checked against the rules of the "required" type except for the rules with the numbers specified by num among the rules which are supported.

file

The source code is checked against the rules with the numbers described in specified file file among the rules which are supported.

Specify one rule number per one line in the file.

 

-

The items that can be specified as num are shown below.
An error will occur if any other item is specified.

2.2 2.3

4.1 4.2

5.2 5.3 5.4 5.5 5.6

6.1 6.2 6.3 6.4 6.5

7.1

8.1 8.2 8.3 8.5 8.6 8.7 8.11 8.12

9.1 9.2 9.3

10.1 10.2 10.3 10.4 10.5 10.6

11.1 11.2 11.3 11.4 11.5

12.1 12.3 12.4 12.5 12.6 12.7 12.8 12.9 12.10 12.11 12.12 12.13

13.1 13.2 13.3 13.4

14.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 14.10

15.1 15.3 15.4 15.5

16.1 16.3 16.5 16.6 16.9

17.5

18.1 18.4

19.3 19.6 19.7 19.8 19.11 19.13 19.14 19.15

20.4 20.5 20.6 20.7 20.8 20.9 20.10 20.11 20.12

-

An error will occur if item is omitted.

-

The __fp16 type is handled as the float type during the check. For the effects of this handling, see the description of the -Xcheck_language_extension [Professional Edition only] option.

[Example of use]

-

To check the source code against MISRA-C:2004 rule number: 5.2, 5.3, and 5.4, describe as:

>ccrh -Xmisra2004=apply=5.2,5.3,5.4 -Xcommon=rh850 main.c