commit | a4bc8fd696a2f1f8fbb786a1157e19630fa7c559 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Wed Mar 05 09:39:41 2025 -0800 |
committer | Elliott Hughes <enh@google.com> | Wed Mar 05 09:39:41 2025 -0800 |
tree | 7d516db16f8a7426d223c40ed7def347e83a8489 | |
parent | d4145bde6214234d3ccb82f0bebc539b630a54ff [diff] |
Comment on the status of ATOMIC_VAR_INIT() in the POSIX test. See "FUTURE DIRECTIONS" in https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdatomic.h.html, but note also that source compatibility -- and the harmlessness of a no-op macro -- suggest we should keep this forever, regardless. Change-Id: I8c3b4e57ca420596423019fce05f6f30b31f7f33
diff --git a/tests/headers/posix/stdatomic_h.c b/tests/headers/posix/stdatomic_h.c index 9f46e6a..270faae 100644 --- a/tests/headers/posix/stdatomic_h.c +++ b/tests/headers/posix/stdatomic_h.c
@@ -66,6 +66,9 @@ MACRO(ATOMIC_POINTER_LOCK_FREE); atomic_flag f = ATOMIC_FLAG_INIT; + + // ATOMIC_VAR_INIT() has been removed from C23, + // but not from POSIX 2024. atomic_int i = ATOMIC_VAR_INIT(123); i = kill_dependency(i);