1 // { dg-options "-x c" }
4 // Copyright (C) 2008 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 2, 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 COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 #include <stdatomic.h>
26 #ifndef ATOMIC_INTEGRAL_LOCK_FREE
27 #error "ATOMIC_INTEGRAL_LOCK_FREE_must_be_a_macro"
30 #ifndef ATOMIC_ADDRESS_LOCK_FREE
31 #error "ATOMIC_ADDRESS_LOCK_FREE_must_be_a_macro"
34 #ifndef ATOMIC_FLAG_INIT
35 #error "ATOMIC_FLAG_INIT_must_be_a_macro"
38 #ifndef atomic_is_lock_free
39 #error "atomic_is_lock_free_must_be_a_macro"
43 #error "atomic_load_must_be_a_macro"
46 #ifndef atomic_load_explicit
47 #error "atomic_load_explicit_must_be_a_macro"
50 #ifndef atomic_store_explicit
51 #error "atomic_store_explicit_must_be_a_macro"
55 #error "atomic_store_must_be_a_macro"
58 #ifndef atomic_exchange_explicit
59 #error "atomic_exchange_explicit_must_be_a_macro"
62 #ifndef atomic_exchange
63 #error "atomic_exchange_must_be_a_macro"
66 #ifndef atomic_compare_exchange
67 #error "atomic_compare_exchange_must_be_a_macro"
70 #ifndef atomic_compare_exchange_explicit
71 #error "atomic_compare_exchange_explicit_must_be_a_macro"
74 #ifndef atomic_fetch_add_explicit
75 #error "atomic_fetch_add_explicit_must_be_a_macro"
78 #ifndef atomic_fetch_add
79 #error "atomic_fetch_add_must_be_a_macro"
82 #ifndef atomic_fetch_sub_explicit
83 #error "atomic_fetch_sub_explicit_must_be_a_macro"
86 #ifndef atomic_fetch_sub
87 #error "atomic_fetch_sub_must_be_a_macro"
90 #ifndef atomic_fetch_and_explicit
91 #error "atomic_fetch_and_explicit_must_be_a_macro"
94 #ifndef atomic_fetch_and
95 #error "atomic_fetch_and_must_be_a_macro"
98 #ifndef atomic_fetch_or_explicit
99 #error "atomic_fetch_or_explicit_must_be_a_macro"
102 #ifndef atomic_fetch_or
103 #error "atomic_fetch_or_must_be_a_macro"
106 #ifndef atomic_fetch_xor_explicit
107 #error "atomic_fetch_xor_explicit_must_be_a_macro"
110 #ifndef atomic_fetch_xor
111 #error "atomic_fetch_xor_must_be_a_macro"