MISRA C makes SW "robust" against compiler failures - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA (https://forum.misra.org.uk/forumdisplay.php?fid=20) +--- Forum: General Questions (https://forum.misra.org.uk/forumdisplay.php?fid=154) +--- Thread: MISRA C makes SW "robust" against compiler failures (/showthread.php?tid=1460) |
MISRA C makes SW "robust" against compiler failures - andream - 05-12-2018 As known, EN 50128:2011 standard asks for evidence that a tool failure might not impact the software safety. In particular, emphasis is placed upon tools that might generate outputs which can directly or indirectly contribute to the executable code (including data) of the safety-related system. Therefore compilers are the first to be assessed in this respect. In case of C language, regardless if certain evidence is available of a compiler full conformance with ISO/IEC 9899:1999 (C99) standard, I was wondering if, at least based on gathered experience, the source code full compliance with MISRA C:2012 makes the source code itself more "robust" against possible residual failures of the compiler. In other words, if it can be said that upon fully complying with MISRA C:2012, the largest part of current compilers does not exhibit failures. Re: MISRA C makes SW "robust" against compiler failures - dg1980 - 05-12-2018 This could get interesting - i assume that is the same like tool qualification in ISO 26262 (e.g. https://www.jnovel.co.jp/en/service/compiler/iso26262.html)? Anyways, i personally divide MISRA rules in three big categories:
So, based on my experience i would answer your question about robustness against compiler failures with no, but i am very much interested in other people's opinions on this subject. Re: MISRA C makes SW "robust" against compiler failures - Francois - 06-12-2018 Hi all. In a previous ASIL D experiment, we reinforced the MISRA rules to make explicit all that can be generated implicitly. In another word: Don't let compiler behave alone. A simple exemple: A computation inside a test: Code: if (((Var >> 3) & 1) == 0)] Instead of letting the compiler behave like this, we had to create a local variable to perform computations. Re: MISRA C makes SW "robust" against compiler failures - misra-c - 12-06-2019 MISRA C:2012 contains a disclaimer "Adherence to the requirements of this document does not in itself ensure error-free robust software or guarantee portability or reuse". The guidelines of MISRA C are intended to define a subset of the C language in which the opportunity to make mistakes is either removed or reduced. However, even fully compliant MISRA C code can not protect you against compiler failures. |