MISRA C:2012 Amendment 3 AMD3 is attached to this post. There are new rules and directives -- and rules and directives are also being amended.
From: https://forum.misra.org.uk/thread-1637.html
{SNIP}
We are pleased to announce the publication of MISRA C:2012 Amendment 3 (MISRA C:2012 AMD3). This document provides additional updates for ISO/IEC 9899:2011/2018 with consideration of new C11/C18 features.
This amendment is intended to be used with MISRA C:2012 (Third Edition, First Revision) as revised and amended by:
MISRA C:2012 Technical Corrigendum 2, and
MISRA C:2012 Amendment 2
This amendment is also compatible with MISRA C:2012 (Third Edition) as revised and amended by:
It looks like "MISRA C:2012 Amendment 2" made it into the MISRA Add-on for cppcheck 2.9
...however a quick review of https://cppcheck.sourceforge.io/misra.php shows the MISRA Add-on is missing some of the rules that existed prior to this : for instance Rule 1.4...which this 3rd Amendment is amending.
I'm just a beginner when it comes to Python. Would someone please volunteer to update the MISRA Add-on to check for the entire rule set?
Separate question: is the reason why cppcheck's MISRA add-on only checks the MISRA Rules is because the MISRA Directives are too difficult to check statically?
Correction: The misra amendment 3 that you attached has not been implemented in the addon! Thanks!
Separate question: is the reason why cppcheck's MISRA add-on only checks the MISRA Rules is because the MISRA Directives are too difficult to check statically?
I have not looked closely. But my understanding is they are not well suited for static analysis.
For instance:
Any implementation-defined behaviour on which the output of the program depends shall be documented and understood
Cppcheck can find implementation defined behavior.. I just don't see how Cppcheck can enforce that the behavior is "documented and understood". Maybe you have some good idea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
MISRA C:2012 Amendment 3 AMD3 is attached to this post. There are new rules and directives -- and rules and directives are also being amended.
From: https://forum.misra.org.uk/thread-1637.html
{SNIP}
We are pleased to announce the publication of MISRA C:2012 Amendment 3 (MISRA C:2012 AMD3). This document provides additional updates for ISO/IEC 9899:2011/2018 with consideration of new C11/C18 features.
This amendment is intended to be used with MISRA C:2012 (Third Edition, First Revision) as revised and amended by:
This amendment is also compatible with MISRA C:2012 (Third Edition) as revised and amended by:
{/SNIP}
It looks like "MISRA C:2012 Amendment 2" made it into the MISRA Add-on for cppcheck 2.9
...however a quick review of https://cppcheck.sourceforge.io/misra.php shows the MISRA Add-on is missing some of the rules that existed prior to this : for instance Rule 1.4...which this 3rd Amendment is amending.
I'm just a beginner when it comes to Python. Would someone please volunteer to update the MISRA Add-on to check for the entire rule set?
Separate question: is the reason why cppcheck's MISRA add-on only checks the MISRA Rules is because the MISRA Directives are too difficult to check statically?
Hello?
I have the feeling that misra.php is not properly updated.
the misra addon contains rule 1.4
Correction: The misra amendment 3 that you attached has not been implemented in the addon! Thanks!
I have not looked closely. But my understanding is they are not well suited for static analysis.
For instance:
Any implementation-defined behaviour on which the output of the program depends shall be documented and understood
Cppcheck can find implementation defined behavior.. I just don't see how Cppcheck can enforce that the behavior is "documented and understood". Maybe you have some good idea.
Hi @danielmarjamaki -- how do we get the MISRA Amendment 3 incorporated into the add-on?
I have not discussed it yet but spontanously I think that we would like to implement this in the Cppcheck Premium soonish (next 3-4 months or so).