1 // { dg-options "-x c" }
4 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
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 3, or (at your option)
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 COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
21 #include <stdatomic.h>
25 #ifndef ATOMIC_INTEGRAL_LOCK_FREE
26 #error "ATOMIC_INTEGRAL_LOCK_FREE_must_be_a_macro"
29 #ifndef ATOMIC_ADDRESS_LOCK_FREE
30 #error "ATOMIC_ADDRESS_LOCK_FREE_must_be_a_macro"
33 #ifndef ATOMIC_FLAG_INIT
34 #error "ATOMIC_FLAG_INIT_must_be_a_macro"
37 #ifndef atomic_is_lock_free
38 #error "atomic_is_lock_free_must_be_a_macro"
42 #error "atomic_load_must_be_a_macro"
45 #ifndef atomic_load_explicit
46 #error "atomic_load_explicit_must_be_a_macro"
49 #ifndef atomic_store_explicit
50 #error "atomic_store_explicit_must_be_a_macro"
54 #error "atomic_store_must_be_a_macro"
57 #ifndef atomic_exchange_explicit
58 #error "atomic_exchange_explicit_must_be_a_macro"
61 #ifndef atomic_exchange
62 #error "atomic_exchange_must_be_a_macro"
65 #ifndef atomic_compare_exchange
66 #error "atomic_compare_exchange_must_be_a_macro"
69 #ifndef atomic_compare_exchange_explicit
70 #error "atomic_compare_exchange_explicit_must_be_a_macro"
73 #ifndef atomic_fetch_add_explicit
74 #error "atomic_fetch_add_explicit_must_be_a_macro"
77 #ifndef atomic_fetch_add
78 #error "atomic_fetch_add_must_be_a_macro"
81 #ifndef atomic_fetch_sub_explicit
82 #error "atomic_fetch_sub_explicit_must_be_a_macro"
85 #ifndef atomic_fetch_sub
86 #error "atomic_fetch_sub_must_be_a_macro"
89 #ifndef atomic_fetch_and_explicit
90 #error "atomic_fetch_and_explicit_must_be_a_macro"
93 #ifndef atomic_fetch_and
94 #error "atomic_fetch_and_must_be_a_macro"
97 #ifndef atomic_fetch_or_explicit
98 #error "atomic_fetch_or_explicit_must_be_a_macro"
101 #ifndef atomic_fetch_or
102 #error "atomic_fetch_or_must_be_a_macro"
105 #ifndef atomic_fetch_xor_explicit
106 #error "atomic_fetch_xor_explicit_must_be_a_macro"
109 #ifndef atomic_fetch_xor
110 #error "atomic_fetch_xor_must_be_a_macro"