[Bug c/71949] ATOMIC_FLAG_INIT definition in stdatomic.h

2016-07-27 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71949 --- Comment #3 from joseph at codesourcery dot com --- atomic_flag can't have additional state for locks because it's lock-free, but it may still be the case that it needs to be initialized in a special way to have a valid set or clear value (t

[Bug c/71949] ATOMIC_FLAG_INIT definition in stdatomic.h

2016-07-27 Thread patrick.pelissier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71949 --- Comment #2 from Patrick Pelissier --- I am not sure that DR#454 applies to this case as _Atomic types are allowed to have additional state needed by the implementation to carry for the atomic object (ยง7.17.2.2) whereas atomic_flag has only tw

[Bug c/71949] ATOMIC_FLAG_INIT definition in stdatomic.h

2016-07-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71949 --- Comment #1 from joseph at codesourcery dot com --- ATOMIC_FLAG_INIT is an initializer, not an expression that can be used in assignments. The C11 model is that it may not be valid to do assignments such as > atomic_flag f2; > f2 = ATO