[C-safe-secure-studygroup] MISRA Rule 3.1

Robert Seacord rcseacord at gmail.com
Wed Apr 19 13:16:44 UTC 2017


I "stole" someone's rule to try to fill in the gaps:

Rule 3.1 – Don't use /* and // within /* comments.  This rule is meant to
catch code which is accidentally commented out.  This is increasingly
uncommon, given the use of IDEs which automatically format comments and
typically display them in a different color.  However, there is not much
value in including comments within comments since there are other
mechanisms in C for commenting out blocks of code such as conditional
compilation which aren't disallowed by this rule.

Q1: Can violations of the rule directly threat safety and security?
A1: No

Q2: Can violations of the rule indirectly threat safety and security?
A2: Yes

Q3: Should an analyzer be able to detect violations of the rule?
A3: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.trustable.io/pipermail/c-safe-secure-studygroup/attachments/20170419/b1c4e98d/attachment.html>


More information about the C-safe-secure-studygroup mailing list