https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69002

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I actually wouldn't want to see GCC start issuing warnings for this code
because it has well-defined semantics there.  It is true that the standard says
accessing an atomic object that hasn't been initialized using one of the
ATOMIC_VAR_INIT() or atomic_init() macros is undefined but that's a historical
accident caused by an incomplete integration of atomic types into the C11 core
language.  It's on my to do list to submit an issue for the next WG14 meeting
to have the requirement removed.

The details of why this code is safe in all known implementations are explained
in my upcoming blog entry.  If you see problems with it or have concerns please
let me know before it's published! :)

Reply via email to