gcc/libstdc++-v3/testsuite/ext/char8_t/atomic-1.cc
Jonathan Wakely 061a745005 Fix tests that fail with -std=gnu++98 or -std=gnu++11
* testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
	* testsuite/18_support/set_unexpected.cc: Likewise.
	* testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
	void.
	* testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
	function to be valid in C++11.
	* testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
	* testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
	include Library Fundamentals or Networking headers in C++11 mode.
	* testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.

From-SVN: r271999
2019-06-06 13:13:42 +01:00

13 lines
400 B
C++

// 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" }