We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 690ecee commit b7857c2Copy full SHA for b7857c2
clang/docs/ReleaseNotes.rst
@@ -750,6 +750,8 @@ Bug Fixes in This Version
750
751
- Fixed `static_cast` to array of unknown bound. Fixes (#GH62863).
752
753
+- Fixed the definition of ATOMIC_FLAG_INIT in stdatomic.h so it can be used in C++.
754
+
755
Bug Fixes to Compiler Builtins
756
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
757
clang/lib/Headers/stdatomic.h
@@ -166,7 +166,11 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
166
167
typedef struct atomic_flag { atomic_bool _Value; } atomic_flag;
168
169
+#ifdef __cplusplus
170
+#define ATOMIC_FLAG_INIT {false}
171
+#else
172
#define ATOMIC_FLAG_INIT { 0 }
173
+#endif
174
175
/* These should be provided by the libc implementation. */
176
#ifdef __cplusplus
0 commit comments