Index: include/atomic =================================================================== --- include/atomic +++ include/atomic @@ -539,7 +539,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !__has_feature(cxx_atomic) && _GNUC_VER < 407 +#if !__has_extension(c_atomic) && _GNUC_VER < 407 #error is not implemented #else @@ -1763,8 +1763,10 @@ typedef atomic atomic_intmax_t; typedef atomic atomic_uintmax_t; -#define ATOMIC_FLAG_INIT {false} -#define ATOMIC_VAR_INIT(__v) {__v} +#if __cplusplus >= 201103L +# define ATOMIC_FLAG_INIT {false} +# define ATOMIC_VAR_INIT(__v) {__v} +#endif // lock-free property Index: test/atomics/atomics.flag/init.pass.cpp =================================================================== --- test/atomics/atomics.flag/init.pass.cpp +++ test/atomics/atomics.flag/init.pass.cpp @@ -9,6 +9,9 @@ // // UNSUPPORTED: libcpp-has-no-threads +// NOTE: ATOMIC_FLAG_INIT is only defined for c++ >= 11 +// XFAIL: c++98, c++03 + // // struct atomic_flag Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp @@ -58,7 +58,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp @@ -65,7 +65,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp @@ -60,7 +60,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp @@ -67,7 +67,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp @@ -43,7 +43,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp @@ -45,7 +45,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp @@ -78,7 +78,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} A(const A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp @@ -82,7 +82,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} A(const A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp @@ -78,7 +78,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} A(const A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp @@ -83,7 +83,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} A(const A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp @@ -41,7 +41,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp @@ -41,7 +41,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp @@ -41,7 +41,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp @@ -41,7 +41,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp @@ -41,7 +41,7 @@ { int i; - explicit A(int d = 0) noexcept {i=d;} + explicit A(int d = 0) _NOEXCEPT {i=d;} friend bool operator==(const A& x, const A& y) {return x.i == y.i;} Index: test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp =================================================================== --- test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp +++ test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp @@ -9,6 +9,9 @@ // // UNSUPPORTED: libcpp-has-no-threads +// NOTE: ATOMIC_VAR_INIT is only defined for c++ >= 11 +// XFAIL: c++98, c++03 + // // #define ATOMIC_VAR_INIT(value)