What is source references in MISRA C?

115 views Asked by At

In the MISRA C document there are explanations about "Source References" and there is a table whose rows are: Unspecified, Undefined, Implementation-defined, Locale-specific, MISRA Guidelines, K&R, Koenig and IEC 61508 and introduces these as source reference. I have researched about Unspecified, Undefined, Implementation-defined, and Locale-specific behaviors. I have become somewhat familiar with them. But I don't know the concept of Source reference and why these behaviors are mentioned in Source references. Also some MISRA C rules that have Source reference. What does this mean? Thanks.

1

There are 1 answers

10
Andrew On

The source references are the primary sources that are MISRA's justifications for the Guidelines, as explained in section 6.10 of MISRA C:

Where a guideline originates from one or more published sources these are indicated in square brackets after the guideline. This serves two purposes. Firstly the specific sources may be consulted by a reader wishing to gain a fuller understanding of the rationale behind the guideline (for example when considering a request for a deviation). Secondly, with regard to Portability Issues described in The Standard, the form of the source gives extra information about the nature of the problem.

Rules which do not have a source reference may have originated from a contributing company’s in-house standard, or have been suggested by a reviewer, or be widely accepted good practice.

These source references fall into two categories, :

  1. Those internal to the C standard
  2. Other

Those internal to the C standard (enumerated in Appendix J of the C Standard) cover:

  1. Undefined behaviour
  2. Unspecified behaviour
  3. Implementation defined behaviour
  4. Locale-specific behaviour

Those external to the C standard include various Standards (eg IEC 61508) or other well-respected books

-- see profile for affiliation