[C2x] Remove the ATOMIC_VAR_INIT macro from stdatomic.h
authorAaron Ballman <aaron@aaronballman.com>
Fri, 24 Feb 2023 18:52:41 +0000 (13:52 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 24 Feb 2023 18:52:41 +0000 (13:52 -0500)
commit898c673e0835a2df395dd2476ac8ee8972d6380b
tree5d77193d3562bfdeef00e698b28df7482ffac4ba
parent198292f26c17bbc4b9595aca0e9886a6a9806594
[C2x] Remove the ATOMIC_VAR_INIT macro from stdatomic.h

This implements WG14 N2886 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2886.htm)
which removed the macro entirely. (NB the macro was deprecated in C17.)
As the paper is not particularly clear on what alternative was picked,
here are my notes from the May 2022 meeting:

Does WG14 wish to adopt variant 1, change 3.2, 3.3, and 3.4 from N2886
into C23?
14/2/2 (consensus)
Does WG14 want to exchange Variant 1 with Variant 2 in N2886 in C23?
9/3/6 (consensus)

(There was no sentiment in the room for either Variant 3 or Variant 4
so those were not voted on.)

Does WG14 want to integrate change 3.5 in N2886 into C23?
8/1/9 (consensus)
Does WG14 want to integrate change 3.6 in N2886 into C23?
2/5/9 (no consensus)

Any code that is broken by the removal can remove the use of
ATOMIC_VAR_INIT and use regular initialization instead.

Differential Revision: https://reviews.llvm.org/D144196
clang/docs/ReleaseNotes.rst
clang/lib/Headers/stdatomic.h
clang/test/C/C2x/n2886.c [new file with mode: 0644]
clang/www/c_status.html