From: Jonathan Wakely Date: Tue, 1 Jun 2021 18:01:37 +0000 (+0100) Subject: libstdc++: Fix new test for C++98 mode [PR 89728] X-Git-Tag: basepoints/gcc-13~7165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b514fce354b5309a9c232a3fe9347e3abde4385f;p=thirdparty%2Fgcc.git libstdc++: Fix new test for C++98 mode [PR 89728] The isblank class is not supported until C++11. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/22_locale/ctype/is/string/89728_neg.cc: Only test isblank for C++11 and later. --- diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/string/89728_neg.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/string/89728_neg.cc index 9f15620c9a8a..89843b68494c 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/string/89728_neg.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/string/89728_neg.cc @@ -45,7 +45,9 @@ void test01() std::isxdigit(make_str(), loc); // { dg-error "required from here" } std::isalnum(make_str(), loc); // { dg-error "required from here" } std::isgraph(make_str(), loc); // { dg-error "required from here" } - std::isblank(make_str(), loc); // { dg-error "required from here" } +#if __cplusplus >= 201103 + std::isblank(make_str(), loc); // { dg-error "required from here" "" { target c++11 } } +#endif std::toupper(make_str(), loc); // { dg-error "required from here" } std::tolower(make_str(), loc); // { dg-error "required from here" } } @@ -66,7 +68,9 @@ void test02() std::isxdigit(make_str(), loc); // { dg-error "required from here" } std::isalnum(make_str(), loc); // { dg-error "required from here" } std::isgraph(make_str(), loc); // { dg-error "required from here" } - std::isblank(make_str(), loc); // { dg-error "required from here" } +#if __cplusplus >= 201103 + std::isblank(make_str(), loc); // { dg-error "required from here" "" { target c++11 } } +#endif std::toupper(make_str(), loc); // { dg-error "required from here" } std::tolower(make_str(), loc); // { dg-error "required from here" } }