Skip to content

Latest commit

 

History

History
14 lines (7 loc) · 688 Bytes

atomics.mkd

File metadata and controls

14 lines (7 loc) · 688 Bytes

Atomic Types

Annoyingly, the _Atomic quaifier does not follow the usual rules for qualifiers. _Atomic-qualified types are completely new types which are not compatible with the non-atomic type. In particular they might have different size and alignment.

Thus, it is not possible to implicitely convert a pointer to a non-atomic to a routine that wants to use atomic accesses.

Potential solution: Make _Atomic a proper qualifier while _Atomic( ) may also change size/alignment.

https://godbolt.org/z/5jo3aY https://godbolt.org/z/aqqzrs

n2771, n2909