[Bug c/61625] _Atomic should create a new type
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 26 20:26:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61625
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
_Atomic is a qualifier. ISO C11 requires that assignments between atomic
and non-atomic versions of the same type work, and that lvalue conversion
produces the non-atomic version of the type, and that assignment to an
_Atomic variable has memory_order_seq_cst semantics. You appear to be
requesting something contradicting the requirements of ISO C.
ATOMIC_VAR_INIT is required for certain classes of implementation
permitted by ISO C but not relevant to GCC (those that include lock data
as part of the representation of an atomic type, so that undefined
behavior would result from assignment to the type without special
initialization - assignment from the non-atomic type must work, but *only*
given that the object has been properly initialized first).
More information about the Gcc-bugs
mailing list