Did you know about MISRA C guidelines?

YES !

I am talking to you guys working in the automotive field.

MISRA comes from Motor Industry Software Reliability Association and its main purpose is to provide guidelines to the automotive industry in order to create safe and reliable software.

If you google a little bit you will find something like this:

Currently MISRA guidelines are produced for C and C++ programming languages only. MISRA C is a software development standard for the C programming language developed by MISRA.  Its aims are to facilitate code safety, portability and reliability in the context of embedded systems, specifically those systems programmed in ISO C. There is also a set of guidelines for MISRA C++.  MISRA-C:1998 had 127 rules, of which 93 were required and 34 were advisory; the rules were numbered in sequence from 1 to 127. The MISRA-C:2004 document contains 141 rules, of which 121 are “required” and 20 are “advisory”; they are divided into 21 topical categories, from “Environment” to “Run-time failures”. MISRA C++ was launched on March 2008.

.. anyway you can find here a very professional but quite skeptical opinion about those rules.

I will just go through some of MISRA C guidelines which popped to my attention:

Rule 9: Comments should not be nested.

I remember many times my Code Composer compiler issued an warning because of my nested comments.

Read more of this post