libstdc++-v3/testsuite/ext/char8_t/atomic-1.cc
raw| 1 | // Test that char8_t related atomic types and macros are not present when |
| 2 | // -fchar8_t is not enabled. |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | // { dg-options "-fno-char8_t" } |
| 5 | |
| 6 | #include <atomic> |
| 7 | |
| 8 | #if defined(ATOMIC_CHAR8_T_LOCK_FREE) |
| 9 | #error ATOMIC_CHAR8_T_LOCK_FREE is defined! |
| 10 | #endif |
| 11 | |
| 12 | std::atomic_char8_t x1; // { dg-error "error: .atomic_char8_t. in namespace .std. does not name a type" "char8_t" } |