]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/from_chars/6.cc
libstdc++-v3 testsuite: Call fesetround(FE_DOWNWARD) only if defined
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / from_chars / 6.cc
index d33484cebfeed003e16f3164bcb8aa12562537b0..fff3450b56c9bf6b55a8ece6c8f367e25447647b 100644 (file)
@@ -30,7 +30,9 @@ test01()
 #if __cpp_lib_to_chars >= 201611L
 #if _GLIBCXX_USE_C99_FENV_TR1
   double d;
+#ifdef FE_DOWNWARD
   std::fesetround(FE_DOWNWARD);
+#endif
   const std::string s = "0.099999999999999999999999999";
   auto res = std::from_chars(s.data(), s.data() + s.length(), d);
   VERIFY( res.ec == std::errc{} );