This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/61625] _Atomic should create a new type


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]