OSDN Git Service

2008-04-10 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / 29_atomics / headers / stdatomic.h / macros.c
1 // { dg-options "-x c" }
2 // { dg-do compile }
3
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.
11
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.
16
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.
21
22 #include <stdatomic.h>
23
24 int main()
25 {
26 #ifndef ATOMIC_INTEGRAL_LOCK_FREE
27     #error "ATOMIC_INTEGRAL_LOCK_FREE_must_be_a_macro"
28 #endif
29
30 #ifndef ATOMIC_ADDRESS_LOCK_FREE
31     #error "ATOMIC_ADDRESS_LOCK_FREE_must_be_a_macro"
32 #endif
33
34 #ifndef ATOMIC_FLAG_INIT
35     #error "ATOMIC_FLAG_INIT_must_be_a_macro"
36 #endif
37
38 #ifndef atomic_is_lock_free
39     #error "atomic_is_lock_free_must_be_a_macro"
40 #endif
41
42 #ifndef atomic_load
43     #error "atomic_load_must_be_a_macro"
44 #endif
45
46 #ifndef atomic_load_explicit
47     #error "atomic_load_explicit_must_be_a_macro"
48 #endif
49
50 #ifndef atomic_store_explicit
51     #error "atomic_store_explicit_must_be_a_macro"
52 #endif
53
54 #ifndef atomic_store
55     #error "atomic_store_must_be_a_macro"
56 #endif
57
58 #ifndef atomic_swap_explicit
59     #error "atomic_swap_explicit_must_be_a_macro"
60 #endif
61
62 #ifndef atomic_swap
63     #error "atomic_swap_must_be_a_macro"
64 #endif
65
66 #ifndef atomic_compare_swap
67     #error "atomic_compare_swap_must_be_a_macro"
68 #endif
69
70 #ifndef atomic_compare_swap_explicit
71     #error "atomic_compare_swap_explicit_must_be_a_macro"
72 #endif
73
74 #ifndef atomic_fence
75     #error "atomic_fence_must_be_a_macro"
76 #endif
77
78 #ifndef atomic_fetch_add_explicit
79     #error "atomic_fetch_add_explicit_must_be_a_macro"
80 #endif
81
82 #ifndef atomic_fetch_add
83     #error "atomic_fetch_add_must_be_a_macro"
84 #endif
85
86 #ifndef atomic_fetch_sub_explicit
87     #error "atomic_fetch_sub_explicit_must_be_a_macro"
88 #endif
89
90 #ifndef atomic_fetch_sub
91     #error "atomic_fetch_sub_must_be_a_macro"
92 #endif
93
94 #ifndef atomic_fetch_and_explicit
95     #error "atomic_fetch_and_explicit_must_be_a_macro"
96 #endif
97  
98 #ifndef atomic_fetch_and
99     #error "atomic_fetch_and_must_be_a_macro"
100 #endif
101
102 #ifndef atomic_fetch_or_explicit
103     #error "atomic_fetch_or_explicit_must_be_a_macro"
104 #endif
105
106 #ifndef atomic_fetch_or
107     #error "atomic_fetch_or_must_be_a_macro"
108 #endif
109
110 #ifndef atomic_fetch_xor_explicit
111     #error "atomic_fetch_xor_explicit_must_be_a_macro"
112 #endif
113
114 #ifndef atomic_fetch_xor
115     #error "atomic_fetch_xor_must_be_a_macro"
116 #endif
117
118   return 0;
119 }