21-08-2015, 05:47 AM
When "shall" or "shall not" appears in a Constraint section of the standard, then the compiler must issue some kind of message if the "shall" or "shall not" is violated. However, when "shall" or "shall not" appear anywhere else in the standard, violation results in undefined behaviour (see N1256, Section 4, paragraph 2). The nature of the undefined behaviour might well be a refusal to compile the program, but it might be to do something else. Its the possibility of this "something else" which the rule is aiming to prevent.
I'll defer to someone who represents the MISRA C Working Group to convince you, or otherwise, of the merits of the rule.
I'll defer to someone who represents the MISRA C Working Group to convince you, or otherwise, of the merits of the rule.
<t></t>