Index: clang/docs/ReleaseNotes.rst =================================================================== --- clang/docs/ReleaseNotes.rst +++ clang/docs/ReleaseNotes.rst @@ -476,6 +476,7 @@ - Implemented `P2128R6: Multidimensional subscript operator `_. - Implemented `P0849R8: auto(x): decay-copy in the language `_. - Implemented `P2242R3: Non-literal variables (and labels and gotos) in constexpr functions `_. +- Implemented `LWG3659: Consider ATOMIC_FLAG_INIT undeprecation `_. CUDA/HIP Language Changes in Clang ---------------------------------- Index: clang/lib/Headers/stdatomic.h =================================================================== --- clang/lib/Headers/stdatomic.h +++ clang/lib/Headers/stdatomic.h @@ -158,10 +158,6 @@ typedef struct atomic_flag { atomic_bool _Value; } atomic_flag; #define ATOMIC_FLAG_INIT { 0 } -#if __cplusplus >= 202002L && !defined(_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS) -/* ATOMIC_FLAG_INIT was deprecated in C++20 but is not deprecated in C. */ -#pragma clang deprecated(ATOMIC_FLAG_INIT) -#endif /* These should be provided by the libc implementation. */ #ifdef __cplusplus Index: clang/test/Headers/stdatomic-deprecations.c =================================================================== --- clang/test/Headers/stdatomic-deprecations.c +++ clang/test/Headers/stdatomic-deprecations.c @@ -12,7 +12,6 @@ void func(void) { _Atomic int i = ATOMIC_VAR_INIT(12); // expected-warning {{macro 'ATOMIC_VAR_INIT' has been marked as deprecated}} \ // expected-note@stdatomic.h:* {{macro marked 'deprecated' here}} - #if defined(ATOMIC_FLAG_INIT) // cxx-warning {{macro 'ATOMIC_FLAG_INIT' has been marked as deprecated}} \ - // cxx-note@stdatomic.h:* {{macro marked 'deprecated' here}} + #if defined(ATOMIC_FLAG_INIT) // Ok, deprecated in C++20, undeprecated in C++23 via LWG4659. #endif }