aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/ext/char8_t/atomic-1.cc
blob: 0841aa3bb06555e8dcc7f607f27878a2c7ee9382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that char8_t related atomic types and macros are not present when
// -fchar8_t is not enabled.
// { dg-do compile { target c++11 } }
// { dg-options "-fno-char8_t" }

#include <atomic>

#if defined(ATOMIC_CHAR8_T_LOCK_FREE)
#error ATOMIC_CHAR8_T_LOCK_FREE is defined!
#endif

std::atomic_char8_t x1; // { dg-error "error: .atomic_char8_t. in namespace .std. does not name a type" "char8_t" }