Index: test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new[](4); } Index: test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new[](4, std::align_val_t{4}); } Index: test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new[](4, std::align_val_t{4}, std::nothrow); } Index: test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new[](4, std::nothrow); } Index: test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new(4, std::align_val_t{4}); } Index: test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp =================================================================== --- test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp +++ test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp @@ -21,5 +21,5 @@ int main () { - ::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + (void)::operator new(4, std::align_val_t{4}, std::nothrow); }