of 4
Jan. 16, 2019
[Notes]
C Compiler Package for RL78 Family
Outline
When using the C compiler package for RL family CC-RL, note the following points:
1. Point for caution when the -misra2012 option is specified. (CCRL#023)
Note: The number following the note is an identifying number for the precautionary note.
1. Point for caution when the -misra2012 option is specified. (CCRL#023)
1.1 Applicable Products
CC-RL V1.03.00 to V1.07.00 [Professional edition] (Rule 16.1 and 16.4)
CC-RL V1.06.00 to V1.07.00 [Professional edition] (Rule 15.6, 15.7, and 16.2)
1.2 Details
When checking source code against MISRA-C:2012 rules by specifying -misra2012 option, the compiler may output
a message for a code which does not violate the rules and may not output a message for a code which violates the rules.
MISRA-C is a set of software development guidelines whose purpose is to maintain the safety, portability and
reliability of embedded systems programmed in the C language.
1.3 Conditions
An error occurs when the following rules are specified.
⚫ Rule 15.6
No message is output for a code which violates the rule if the -lang=c99 option is specified.
⚫ Rule 15.7
No message is output for a code which violates the rule if the -lang=c99 option is specified.
⚫ Rule 16.1
No message is output for a code that violates the rule if all of the following conditions are met:
(1) “{“ is written immediately after a switch statement (controlling expression).
(2) Both a case clause and a default clause are written in the switch statement (1).
(3) Each case clause and default clause in (2) ends with a break statement or a compound statement
(Note1)
(block) which includes a break statement at the end.
(4) At least one of the case clauses or default clauses in (3) meets all the conditions below.
(4-1) A compound statement (block) which is neither a selection statement (if or switch) nor a repeat
statement (while, do-while, or for) is written at the end.
(4-2) A statement is written before the compound statement (block) in (4-1).