From: Jakub Jelinek Date: Mon, 4 Nov 2024 11:29:01 +0000 (+0100) Subject: libstdc++: Fix up 117406.cc test [PR117406] X-Git-Tag: basepoints/gcc-16~4670 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afcbf4dd27c147eb7d8f84e1a41c021eddec777e;p=thirdparty%2Fgcc.git libstdc++: Fix up 117406.cc test [PR117406] Christophe mentioned in bugzilla that the test FAILs on aarch64, I'm not including and use INT_MAX. Apparently during my testing I got it because the test preinclude -include bits/stdc++.h and that includes , dunno why that didn't happen on aarch64. In any case, either I can add #include , or because the test already has #include I've changed uses of INT_MAX with std::numeric_limits::max(), that should be the same thing. But if you prefer #include I can surely add that instead. 2024-11-04 Jakub Jelinek PR libstdc++/117406 * testsuite/26_numerics/headers/cmath/117406.cc: Use std::numeric_limits::max() instead of INT_MAX. --- diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc index 8966c71ecdcb..59a5ed83bebc 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc @@ -31,9 +31,9 @@ test () int t0 = std::ilogb(T(4.0)); VERIFY( t0 == 2 ); int t1 = std::ilogb(lim::infinity()); - VERIFY( t1 == INT_MAX ); + VERIFY( t1 == std::numeric_limits::max() ); int t2 = std::ilogb(-lim::infinity()); - VERIFY( t2 == INT_MAX ); + VERIFY( t2 == std::numeric_limits::max() ); } int