C and C++


CONCURRENCY.C_ATOMIC.VOID : Void C Atomic

Summary

The _Atomic qualifier is applied to type void.

Properties

Class Name Void C Atomic
Significance reliability
Mnemonic CONCURRENCY.C_ATOMIC.VOID
Categories
MisraC2023 MisraC2023:11.10 The _Atomic qualifier shall not be applied to the incomplete type void
Misra2012 Misra2012:11.10 The _Atomic qualifier shall not be applied to the incomplete type void
Availability Available for C only (not C++).
Enabling Checks for this warning class are disabled by default, and require the unnormalized C ASTs for the project. To enable them, add the following WARNING_FILTER rule and RETAIN_UNNORMALIZED_C_AST specification to the project configuration file.
RETAIN_UNNORMALIZED_C_AST = Yes
WARNING_FILTER += allow class="Void C Atomic"
Note that retaining the unnormalized ASTs will increase the disk space used to store the project representation, and may make the analysis take longer.

Example

void _Atomic *pav; /* 'Void C Atomic' warning issued here
                    * - pointer to atomic void */

void * _Atomic apv;       /* ok: atomic pointer to (non-atomic) void */
void * pv;                /* ok: not atomic */
int _Atomic *pai;         /* ok: not void */

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.