Menu

MISRA C:2012 Amendment 3 AMD3 just posted

2022-12-06
2023-01-18
  • Philip Schlesinger

    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:

    MISRA C:2012 Technical Corrigendum 1, 
    MISRA C:2012 Technical Corrigendum 2, 
    MISRA C:2012 Amendment 1, and
    MISRA C:2012 Amendment 2.
    

    {/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?

     
  • Philip Schlesinger

    Hello?

     
  • Daniel Marjamäki

    I have the feeling that misra.php is not properly updated.

    the misra addon contains rule 1.4

     
    • Daniel Marjamäki

      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.

       
      • Philip Schlesinger

        Hi @danielmarjamaki -- how do we get the MISRA Amendment 3 incorporated into the add-on?

         
        • Daniel Marjamäki

          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).

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.