]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix new test for C++98 mode [PR 89728]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 1 Jun 2021 18:01:37 +0000 (19:01 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 1 Jun 2021 18:02:42 +0000 (19:02 +0100)
The isblank class is not supported until C++11.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* testsuite/22_locale/ctype/is/string/89728_neg.cc: Only test
isblank for C++11 and later.

libstdc++-v3/testsuite/22_locale/ctype/is/string/89728_neg.cc

index 9f15620c9a8ac142ce7c9de1614a937658dcc804..89843b68494cbb1577ecbb11130410ecc8fde2e5 100644 (file)
@@ -45,7 +45,9 @@ void test01()
   std::isxdigit(make_str<char, 7>(), loc);     // { dg-error "required from here" }
   std::isalnum(make_str<char, 8>(), loc);      // { dg-error "required from here" }
   std::isgraph(make_str<char, 9>(), loc);      // { dg-error "required from here" }
-  std::isblank(make_str<char, 10>(), loc);     // { dg-error "required from here" }
+#if __cplusplus >= 201103
+  std::isblank(make_str<char, 10>(), loc);     // { dg-error "required from here" "" { target c++11 } }
+#endif
   std::toupper(make_str<char, 11>(), loc);     // { dg-error "required from here" }
   std::tolower(make_str<char, 12>(), loc);     // { dg-error "required from here" }
 }
@@ -66,7 +68,9 @@ void test02()
   std::isxdigit(make_str<wchar_t, 7>(), loc);  // { dg-error "required from here" }
   std::isalnum(make_str<wchar_t, 8>(), loc);   // { dg-error "required from here" }
   std::isgraph(make_str<wchar_t, 9>(), loc);   // { dg-error "required from here" }
-  std::isblank(make_str<wchar_t, 10>(), loc);  // { dg-error "required from here" }
+#if __cplusplus >= 201103
+  std::isblank(make_str<wchar_t, 10>(), loc);  // { dg-error "required from here" "" { target c++11 } }
+#endif
   std::toupper(make_str<wchar_t, 11>(), loc);  // { dg-error "required from here" }
   std::tolower(make_str<wchar_t, 12>(), loc);  // { dg-error "required from here" }
 }