diff --git a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp index b7cfdbea..63f847f4 100644 --- a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp +++ b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp @@ -35,7 +35,7 @@ int main() std::set_new_handler(new_handler); try { - void* vp = operator new[] (std::numeric_limits::max()); + void*volatile vp = operator new[] (std::numeric_limits::max()); assert(false); } catch (std::bad_alloc&) diff --git a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp index 6537afe8..60bc7c40 100644 --- a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp +++ b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp @@ -35,7 +35,7 @@ int main() std::set_new_handler(new_handler); try { - void* vp = operator new [] (std::numeric_limits::max(), std::nothrow); + void*volatile vp = operator new [] (std::numeric_limits::max(), std::nothrow); assert(new_handler_called == 1); assert(vp == 0); } diff --git a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp index 3d836969..9bf6e8a8 100644 --- a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp +++ b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp @@ -29,7 +29,7 @@ void operator delete(void* p) throw() std::free(p); } -int A_constructed = 0; +volatile int A_constructed = 0; struct A { diff --git a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp index c01945e9..959bc450 100644 --- a/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp +++ b/test/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp @@ -15,7 +15,7 @@ #include #include -int new_called = 0; +volatile int new_called = 0; void* operator new(std::size_t s) throw(std::bad_alloc) {