2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libstdc++-v3 / testsuite / 29_atomics / headers / stdatomic.h / macros.c
blob30368a06bf4b39ddcef09ca4430715c4ba0e445c
1 // { dg-options "-x c" }
2 // { dg-do compile }
4 // Copyright (C) 2008 Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
22 #include <stdatomic.h>
24 int main()
26 #ifndef ATOMIC_INTEGRAL_LOCK_FREE
27 #error "ATOMIC_INTEGRAL_LOCK_FREE_must_be_a_macro"
28 #endif
30 #ifndef ATOMIC_ADDRESS_LOCK_FREE
31 #error "ATOMIC_ADDRESS_LOCK_FREE_must_be_a_macro"
32 #endif
34 #ifndef ATOMIC_FLAG_INIT
35 #error "ATOMIC_FLAG_INIT_must_be_a_macro"
36 #endif
38 #ifndef atomic_is_lock_free
39 #error "atomic_is_lock_free_must_be_a_macro"
40 #endif
42 #ifndef atomic_load
43 #error "atomic_load_must_be_a_macro"
44 #endif
46 #ifndef atomic_load_explicit
47 #error "atomic_load_explicit_must_be_a_macro"
48 #endif
50 #ifndef atomic_store_explicit
51 #error "atomic_store_explicit_must_be_a_macro"
52 #endif
54 #ifndef atomic_store
55 #error "atomic_store_must_be_a_macro"
56 #endif
58 #ifndef atomic_swap_explicit
59 #error "atomic_swap_explicit_must_be_a_macro"
60 #endif
62 #ifndef atomic_swap
63 #error "atomic_swap_must_be_a_macro"
64 #endif
66 #ifndef atomic_compare_swap
67 #error "atomic_compare_swap_must_be_a_macro"
68 #endif
70 #ifndef atomic_compare_swap_explicit
71 #error "atomic_compare_swap_explicit_must_be_a_macro"
72 #endif
74 #ifndef atomic_fence
75 #error "atomic_fence_must_be_a_macro"
76 #endif
78 #ifndef atomic_fetch_add_explicit
79 #error "atomic_fetch_add_explicit_must_be_a_macro"
80 #endif
82 #ifndef atomic_fetch_add
83 #error "atomic_fetch_add_must_be_a_macro"
84 #endif
86 #ifndef atomic_fetch_sub_explicit
87 #error "atomic_fetch_sub_explicit_must_be_a_macro"
88 #endif
90 #ifndef atomic_fetch_sub
91 #error "atomic_fetch_sub_must_be_a_macro"
92 #endif
94 #ifndef atomic_fetch_and_explicit
95 #error "atomic_fetch_and_explicit_must_be_a_macro"
96 #endif
98 #ifndef atomic_fetch_and
99 #error "atomic_fetch_and_must_be_a_macro"
100 #endif
102 #ifndef atomic_fetch_or_explicit
103 #error "atomic_fetch_or_explicit_must_be_a_macro"
104 #endif
106 #ifndef atomic_fetch_or
107 #error "atomic_fetch_or_must_be_a_macro"
108 #endif
110 #ifndef atomic_fetch_xor_explicit
111 #error "atomic_fetch_xor_explicit_must_be_a_macro"
112 #endif
114 #ifndef atomic_fetch_xor
115 #error "atomic_fetch_xor_must_be_a_macro"
116 #endif
118 return 0;