MISRA C:2012 Amendment 4
Updates for ISO/IEC 9899:2011/2018
Phase 3 — Multi-threading and atomics
March 2023
Foreword
An updated edition of the C Standard, ISO/IEC 9899:2011, commonly referred to as C11, was
released just as MISRA C:2012 was being prepared for publication, meaning it arrived too late for the
MISRA C Working Group to take it into consideration. Subsequently a further edition,
ISO/IEC 9899:2018, commonly referred to as C18, followed.
As the adoption of C11 and then C18 became more widespread, the MISRA C Working Group
decided that it was time to address these new editions of the C Standard, support for which is being
implemented by means of a series of amendments to MISRA C:2012. To date, the following have
been published:
● MISRA C:2012 Amendment 2 C11 Core (published February 2020), and
● MISRA C:2012 Amendment 3 C11/C18 New features (published October 2022).
This document further amends MISRA C:2012 as required to introduce support for most of the
remaining new features introduced by C11 and C18, as well as some additional guidance on existing
language features.
We trust that this amendment will be welcomed by the community at large, and will offer confidence
to projects and organizations who have held off migrating to C11 or C18.
Andrew Banks FBCS CITP
Chairman, MISRA C Working Group
...
1 Overview
1.1 Applicability
This amendment is intended to be used with MISRA C:2012 (Third Edition, First Revision) [2] as
revised and amended by
● MISRA C:2012 Amendment 2 [6],
● MISRA C:2012 Amendment 3 [7], and
● MISRA C:2012 Technical Corrigendum 2 [4]
This amendment is also compatible with MISRA C:2012 (Third Edition) [1] as revised and amended by:
● MISRA C:2012 Amendment 1 [5],
● MISRA C:2012 Amendment 2 [6],
● MISRA C:2012 Amendment 3 [7],
● MISRA C:2012 Technical Corrigendum 1 [3], and
● MISRA C:2012 Technical Corrigendum 2 [4]
1.2 C language updates
This document further amends MISRA C:2012 as follows:
1. To permit the use, with restrictions, of the following ISO/IEC 9899:2011 [12] features:
▬ Atomic functions (<stdatomic.h>)
▬ Multi-threading (<threads.h>)
2. To provide further guidance on the use of the following:
▬ Small integer constants
▬ Unused objects
▬ Chained initialization (also revises Rule 9.4)
▬ Variably-modified arrays (also revises Rule 18.10)
When using ISO/IEC 9899:2011 [12], use of the following features remains prohibited without the
support of a deviation against Rule 1.4:
● Bounds-checking interfaces (Annex K)</threads.h></stdatomic.h>
What is the process to follow to get this implemented into the MISRA analysis add-on?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
https://forum.misra.org.uk/thread-1645.html
MISRA C:2012 Amendment 4
Updates for ISO/IEC 9899:2011/2018
Phase 3 — Multi-threading and atomics
March 2023
What is the process to follow to get this implemented into the MISRA analysis add-on?
Thanks!