1 // { dg-do preprocess { target c++11 } }
2 
3 // Copyright (C) 2008-2016 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library.  This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
9 // any later version.
10 
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3.  If not see
18 // <http://www.gnu.org/licenses/>.
19 
20 #include <atomic>
21 
22 #ifndef ATOMIC_BOOL_LOCK_FREE
23 # error "ATOMIC_BOOL_LOCK_FREE must be a macro"
24 #elif ATOMIC_BOOL_LOCK_FREE != 1 && ATOMIC_BOOL_LOCK_FREE != 2
25 # error "ATOMIC_BOOL_LOCK_FREE must be 1 or 2"
26 #endif
27 
28 #ifndef ATOMIC_CHAR_LOCK_FREE
29 # error "ATOMIC_CHAR_LOCK_FREE must be a macro"
30 #elif ATOMIC_CHAR_LOCK_FREE != 1 && ATOMIC_CHAR_LOCK_FREE != 2
31 # error "ATOMIC_CHAR_LOCK_FREE must be 1 or 2"
32 #endif
33 
34 #ifndef ATOMIC_CHAR16_T_LOCK_FREE
35 # error "ATOMIC_CHAR16_T_LOCK_FREE must be a macro"
36 #elif ATOMIC_CHAR16_T_LOCK_FREE != 1 && ATOMIC_CHAR16_T_LOCK_FREE != 2
37 #endif
38 
39 #ifndef ATOMIC_CHAR32_T_LOCK_FREE
40 # error "ATOMIC_CHAR32_T_LOCK_FREE must be a macro"
41 #elif ATOMIC_CHAR32_T_LOCK_FREE != 1 && ATOMIC_CHAR32_T_LOCK_FREE != 2
42 # error "ATOMIC_CHAR32_T_LOCK_FREE must be 1 or 2"
43 #endif
44 
45 #ifndef ATOMIC_WCHAR_T_LOCK_FREE
46 # error "ATOMIC_WCHAR_T_LOCK_FREE must be a macro"
47 #elif ATOMIC_WCHAR_T_LOCK_FREE != 1 && ATOMIC_WCHAR_T_LOCK_FREE != 2
48 # error "ATOMIC_WCHAR_T_LOCK_FREE must be 1 or 2"
49 #endif
50 
51 #ifndef ATOMIC_SHORT_LOCK_FREE
52 # error "ATOMIC_SHORT_LOCK_FREE must be a macro"
53 #elif ATOMIC_SHORT_LOCK_FREE != 1 && ATOMIC_SHORT_LOCK_FREE != 2
54 # error "ATOMIC_SHORT_LOCK_FREE must be 1 or 2"
55 #endif
56 
57 #ifndef ATOMIC_INT_LOCK_FREE
58 # error "ATOMIC_INT_LOCK_FREE must be a macro"
59 #elif ATOMIC_INT_LOCK_FREE != 1 && ATOMIC_INT_LOCK_FREE != 2
60 # error "ATOMIC_INT_LOCK_FREE must be 1 or 2"
61 #endif
62 
63 #ifndef ATOMIC_LONG_LOCK_FREE
64 # error "ATOMIC_LONG_LOCK_FREE must be a macro"
65 #elif ATOMIC_LONG_LOCK_FREE != 1 && ATOMIC_LONG_LOCK_FREE != 2
66 # error "ATOMIC_LONG_LOCK_FREE must be 1 or 2"
67 #endif
68 
69 #ifndef ATOMIC_LLONG_LOCK_FREE
70 # error "ATOMIC_LLONG_LOCK_FREE must be a macro"
71 #elif ATOMIC_LLONG_LOCK_FREE != 1 && ATOMIC_LLONG_LOCK_FREE != 2
72 # error "ATOMIC_LLONG_LOCK_FREE must be 1 or 2"
73 #endif
74 
75 #ifndef ATOMIC_POINTER_LOCK_FREE
76 # error "ATOMIC_POINTER_LOCK_FREE must be a macro"
77 #elif ATOMIC_POINTER_LOCK_FREE != 1 && ATOMIC_POINTER_LOCK_FREE != 2
78 # error "ATOMIC_POINTER_LOCK_FREE must be 1 or 2"
79 #endif
80 
81 #ifndef ATOMIC_FLAG_INIT
82     #error "ATOMIC_FLAG_INIT_must_be_a_macro"
83 #endif
84 
85 #ifndef ATOMIC_VAR_INIT
86     #error "ATOMIC_VAR_INIT_must_be_a_macro"
87 #endif
88