28-09-2010, 06:23 PM
Hi,
I don't quite understand your last question.
However, I can say that a break statement within an if-else construct by itself is not a violation of a MISRA rule as it may be being used to break out of an iteration statement (see rule 14.6).
The grammar of the C language is extended by Rule 15.0 such that not terminating the added "case-clause" as indicated means that the code does not comply with the extended grammar and hence not compliant with Rule 15.0.
The reason you don't get a warning is probably because your MISRA checker is broken. What are you using?
I don't quite understand your last question.
However, I can say that a break statement within an if-else construct by itself is not a violation of a MISRA rule as it may be being used to break out of an iteration statement (see rule 14.6).
The grammar of the C language is extended by Rule 15.0 such that not terminating the added "case-clause" as indicated means that the code does not comply with the extended grammar and hence not compliant with Rule 15.0.
The reason you don't get a warning is probably because your MISRA checker is broken. What are you using?
<t></t>