From: Martin Sebor Date: Wed, 1 Jul 2020 14:30:52 +0000 (-0600) Subject: Adjust text of expected warnings changed in PR c++/86568. X-Git-Tag: upstream/12.2.0~15194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8461191b826654a30eaaa57257bcca8e548f11c2;p=platform%2Fupstream%2Fgcc.git Adjust text of expected warnings changed in PR c++/86568. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust text of expected warning. * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same. * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same. * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same. * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same. --- diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc index dc93cd6..81c6fc5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/nonnull.cc @@ -23,7 +23,7 @@ void test01() { - std::string_view s((const char*)nullptr); // { dg-warning "null arg" } - std::string_view t((char*)nullptr); // { dg-warning "null arg" } - std::string_view u(nullptr); // { dg-warning "null arg" } + std::string_view s((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + std::string_view t((char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + std::string_view u(nullptr); // { dg-warning "\\\[-Wnonnull" } } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc index ded89c2..ce95884 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc @@ -23,7 +23,7 @@ void test01() { - std::wstring_view s((const wchar_t*)nullptr); // { dg-warning "null arg" } - std::wstring_view t((wchar_t*)nullptr); // { dg-warning "null arg" } - std::wstring_view u(nullptr); // { dg-warning "null arg" } + std::wstring_view s((const wchar_t*)nullptr); // { dg-warning "\\\[-Wnonnull" } + std::wstring_view t((wchar_t*)nullptr); // { dg-warning "\\\[-Wnonnull" } + std::wstring_view u(nullptr); // { dg-warning "\\\[-Wnonnull" } } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc index 0deba71..7060ffb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc @@ -24,6 +24,6 @@ int test01() { std::string_view s = "abcd"; - return s.compare((const char*)nullptr); // { dg-warning "null arg" } - return s.compare(0, 2, (const char*)nullptr); // { dg-warning "null arg" } + return s.compare((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + return s.compare(0, 2, (const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc index d097866..97c7629 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc @@ -24,10 +24,10 @@ int test01() { std::string_view s = "abcd"; - return s.find((const char*)nullptr); // { dg-warning "null arg" } - return s.find((const char*)nullptr, 1); // { dg-warning "null arg" } - return s.find_first_of((const char*)nullptr); // { dg-warning "null arg" } - return s.find_first_of((const char*)nullptr, 1); // { dg-warning "null arg" } - return s.find_first_not_of((const char*)nullptr); // { dg-warning "null arg" } - return s.find_first_not_of((const char*)nullptr, 1); // { dg-warning "null arg" } + return s.find((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + return s.find((const char*)nullptr, 1); // { dg-warning "\\\[-Wnonnull" } + return s.find_first_of((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + return s.find_first_of((const char*)nullptr, 1); // { dg-warning "\\\[-Wnonnull" } + return s.find_first_not_of((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + return s.find_first_not_of((const char*)nullptr, 1); // { dg-warning "\\\[-Wnonnull" } } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc index 55119b5..91525a5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc @@ -24,6 +24,6 @@ int test01() { std::string_view s = "abcd"; - return s.rfind((const char*)nullptr); // { dg-warning "null arg" } - return s.rfind((const char*)nullptr, 1); // { dg-warning "null arg" } + return s.rfind((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } + return s.rfind((const char*)nullptr, 1); // { dg-warning "\\\[-Wnonnull" } }