Glossary

MISRA-C

MISRA-C is a set of software development guidelines for the C programming language published by MISRA (the Motor Industry Software Reliability Association). MISRA is a collaboration between vehicle manufacturers, component suppliers, and engineering consultancies that promotes best practice in developing safety-related electronic systems in road vehicles and other embedded systems.

Scope and Language Subset

The guidelines define a subset of the C language intended to be suitable for critical embedded systems. Rather than promoting the use of C itself, MISRA-C seeks to enable its safest possible use by restricting language constructs known to be insecure, ambiguous, or implementation-defined. The 2004 edition is based on ISO/IEC 9899:1990 (C90) as amended by COR1:1995, AMD1:1995, and COR2:1996, and targets a “free-standing environment” typical of embedded automotive applications.

AttributeSpecification
Base language standardISO/IEC 9899:1990 (C90) with amendments
Target environmentFree-standing (embedded) systems
Total rules (2004 edition)142
Compliance claimPer product, not per organisation
Table 1

Rule Categories and Classification

The guidelines are organised into categories covering environment, language extensions, types, declarations, expressions, control flow, functions, pointers, preprocessing directives, standard libraries, and run-time failures. Each rule is classified as either required or advisory.

ClassificationCountRequirement
Required122Mandatory; deviations must be formally raised, justified, and documented
Advisory20Should be followed as far as reasonably practical; formal deviations are optional
Table 2

Claiming Compliance

Compliance can be claimed only for a specific product. A claim requires that all code is compliant with the rules or subject to documented deviations, that a compliance matrix demonstrates how each rule is enforced (via static analysis tools, manual review, or other means), and that supporting processes, such as tool validation, training, and style guidance, have been addressed. The use of static checking tools to enforce compliance is strongly encouraged.


Leave a Reply

Your email address will not be published. Required fields are marked *

← all glossary entries