1 // RUN: %clang_cc1 -verify -ffreestanding -std=c11 %s
2 // expected-no-diagnostics
5 * Explicit initializers for atomics
7 * NB: We can only test the compile time behavior from the paper, not the
11 #include <stdatomic.h>
13 #ifndef ATOMIC_BOOL_LOCK_FREE
14 #error "Missing ATOMIC_BOOL_LOCK_FREE"
17 #ifndef ATOMIC_CHAR_LOCK_FREE
18 #error "Missing ATOMIC_CHAR_LOCK_FREE"
21 #ifndef ATOMIC_CHAR16_T_LOCK_FREE
22 #error "Missing ATOMIC_CHAR16_T_LOCK_FREE"
25 #ifndef ATOMIC_CHAR32_T_LOCK_FREE
26 #error "Missing ATOMIC_CHAR32_T_LOCK_FREE"
29 #ifndef ATOMIC_WCHAR_T_LOCK_FREE
30 #error "Missing ATOMIC_WCHAR_T_LOCK_FREE"
33 #ifndef ATOMIC_SHORT_LOCK_FREE
34 #error "Missing ATOMIC_SHORT_LOCK_FREE"
37 #ifndef ATOMIC_INT_LOCK_FREE
38 #error "Missing ATOMIC_INT_LOCK_FREE"
41 #ifndef ATOMIC_LONG_LOCK_FREE
42 #error "Missing ATOMIC_LONG_LOCK_FREE"
45 #ifndef ATOMIC_LLONG_LOCK_FREE
46 #error "Missing ATOMIC_LLONG_LOCK_FREE"
49 #ifndef ATOMIC_POINTER_LOCK_FREE
50 #error "Missing ATOMIC_POINTER_LOCK_FREE"
53 #ifndef ATOMIC_VAR_INIT
54 #error "Missing ATOMIC_VAR_INIT"
58 #error "Missing atomic_init"