1 // RUN: %clang_cc1 -verify -ffreestanding -std=c11 %s 2 // expected-no-diagnostics 3 4 /* WG14 N1482: Clang 4 5 * Explicit initializers for atomics 6 * 7 * NB: We can only test the compile time behavior from the paper, not the 8 * runtime behavior. 9 */ 10 11 #include <stdatomic.h> 12 13 #ifndef ATOMIC_BOOL_LOCK_FREE 14 #error "Missing ATOMIC_BOOL_LOCK_FREE" 15 #endif 16 17 #ifndef ATOMIC_CHAR_LOCK_FREE 18 #error "Missing ATOMIC_CHAR_LOCK_FREE" 19 #endif 20 21 #ifndef ATOMIC_CHAR16_T_LOCK_FREE 22 #error "Missing ATOMIC_CHAR16_T_LOCK_FREE" 23 #endif 24 25 #ifndef ATOMIC_CHAR32_T_LOCK_FREE 26 #error "Missing ATOMIC_CHAR32_T_LOCK_FREE" 27 #endif 28 29 #ifndef ATOMIC_WCHAR_T_LOCK_FREE 30 #error "Missing ATOMIC_WCHAR_T_LOCK_FREE" 31 #endif 32 33 #ifndef ATOMIC_SHORT_LOCK_FREE 34 #error "Missing ATOMIC_SHORT_LOCK_FREE" 35 #endif 36 37 #ifndef ATOMIC_INT_LOCK_FREE 38 #error "Missing ATOMIC_INT_LOCK_FREE" 39 #endif 40 41 #ifndef ATOMIC_LONG_LOCK_FREE 42 #error "Missing ATOMIC_LONG_LOCK_FREE" 43 #endif 44 45 #ifndef ATOMIC_LLONG_LOCK_FREE 46 #error "Missing ATOMIC_LLONG_LOCK_FREE" 47 #endif 48 49 #ifndef ATOMIC_POINTER_LOCK_FREE 50 #error "Missing ATOMIC_POINTER_LOCK_FREE" 51 #endif 52 53 #ifndef ATOMIC_VAR_INIT 54 #error "Missing ATOMIC_VAR_INIT" 55 #endif 56 57 #ifndef atomic_init 58 #error "Missing atomic_init" 59 #endif 60