This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of SG1 status.

3659. Consider ATOMIC_FLAG_INIT undeprecation

Section: D.26.5 [depr.atomics.flag] Status: SG1 Submitter: Aaron Ballman Opened: 2022-01-18 Last modified: 2022-01-22

Priority: 3

View all issues with SG1 status.


P0883R2 deprecated ATOMTIC_VAR_INIT and ATOMIC_FLAG_INIT largely based on rationale from WG14. However, WG14 only deprecated ATOMIC_VAR_INIT because we were told by implementers that ATOMIC_FLAG_INIT is still necessary for some platforms (platforms for which "clear" is actually not all zero bits, which I guess exist).

I'd like to explore whether WG21 should undeprecate ATOMIC_FLAG_INIT as there was no motivation that I could find in the paper on the topic or in the discussion at P0883R0 [Jacksonville 2018].

One possible approach would be to undeprecate it from <stdatomic.h> only (C++ can still use the constructors from <atomic> and shared code can use the macros from <stdatomic.h>).

[2022-01-30; Reflector poll]

Set priority to 3 after reflector poll. Send to SG1.

Proposed resolution: