[gcc r13-9568] libstdc++: Fix up 117406.cc test [PR117406]
Jakub Jelinek
jakub@gcc.gnu.org
Wed Apr 23 13:08:05 GMT 2025
https://gcc.gnu.org/g:dbe57b12c5b30f7ad4fab6352a1b293349750575
commit r13-9568-gdbe57b12c5b30f7ad4fab6352a1b293349750575
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Nov 4 12:29:01 2024 +0100
libstdc++: Fix up 117406.cc test [PR117406]
Christophe mentioned in bugzilla that the test FAILs on aarch64,
I'm not including <climits> and use INT_MAX.
Apparently during my testing I got it because the test preinclude
-include bits/stdc++.h
and that includes <climits>, dunno why that didn't happen on aarch64.
In any case, either I can add #include <climits>, or because the
test already has #include <limits> I've changed uses of INT_MAX
with std::numeric_limits<int>::max(), that should be the same thing.
But if you prefer
#include <climits>
I can surely add that instead.
2024-11-04 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/117406
* testsuite/26_numerics/headers/cmath/117406.cc: Use
std::numeric_limits<int>::max() instead of INT_MAX.
(cherry picked from commit afcbf4dd27c147eb7d8f84e1a41c021eddec777e)
Diff:
---
libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc
index 4e2f8c43d2b9..6e4eb8888592 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/117406.cc
@@ -32,9 +32,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<int>::max() );
int t2 = std::ilogb(-lim::infinity());
- VERIFY( t2 == INT_MAX );
+ VERIFY( t2 == std::numeric_limits<int>::max() );
}
int
More information about the Libstdc++-cvs
mailing list