// { dg-options "-Wnonnull -O0 -Wno-unused-result" } // { dg-do compile { target c++20 } } #include void test01(const __gnu_test::string& s) { s.ends_with((const char*)nullptr); // { dg-warning "\\\[-Wnonnull" } s.ends_with((char*)nullptr); // { dg-warning "\\\[-Wnonnull" } s.ends_with(nullptr); // { dg-warning "\\\[-Wnonnull" } }