]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
libstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / operations / ends_with / nonnull.cc
1 // { dg-options "-Wnonnull -O0 -Wno-unused-result" }
2 // { dg-do compile { target c++20 } }
3
4 #include <testsuite_string.h>
5
6 void
7 test01(const __gnu_test::string& s)
8 {
9 s.ends_with((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" }
10 s.ends_with((char*)nullptr); // { dg-warning "\\\[-Wnonnull" }
11 s.ends_with(nullptr); // { dg-warning "\\\[-Wnonnull" }
12 }