This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: Remove specialization of test for FreeBSD systems
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Tue, 22 Oct 2002 04:36:28 -0500 (CDT)
- Subject: PATCH: Remove specialization of test for FreeBSD systems
- Reply-to: rittle at labs dot mot dot com
The recent redesign of the FP support in gcc fixed this (possibly,
misidentified) excess precision problem. 18_support/numeric_limits.cc
passes i386-*-freebsd* without this hack. It almost passes
alpha-*-freebsd* but the current failures are completely unrelated.
As committed.
* testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
Remove specialization for FreeBSD systems.
Index: testsuite/18_support/numeric_limits.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/18_support/numeric_limits.cc,v
retrieving revision 1.17
diff -c -r1.17 numeric_limits.cc
*** testsuite/18_support/numeric_limits.cc 25 Sep 2002 19:37:04 -0000 1.17
--- testsuite/18_support/numeric_limits.cc 22 Oct 2002 09:30:30 -0000
***************
*** 71,104 ****
VERIFY( extrema_max == limits_max );
}
- #ifdef __FreeBSD__
- // This specialization allows the extra precision unmentioned in
- // system headers yet supported by long double on FreeBSD or Solaris
- // to not cause a gratuitous FAIL for the entire test. Using this
- // technique to compare the residual against epsilon ensures that any
- // major breakage will still be detected (although obviously not as
- // tight as the exact equality check that would have been generated by
- // default). This replacement test is allowable by the fact that C++
- // limits should match the system provided limits for C even if they
- // were wrong verses the actual FP hardware.
- template<>
- void test_extrema<long double>()
- {
- typedef long double T;
- bool test = true;
- T limits_min = std::numeric_limits<T>::min();
- T limits_max = std::numeric_limits<T>::max();
- T extrema_min = extrema<T>::min;
- T extrema_max = extrema<T>::max;
- T epsilon = std::numeric_limits<T>::epsilon();
-
- VERIFY( (extrema_min - limits_min) < epsilon );
- VERIFY( (limits_min - extrema_min) < epsilon );
- VERIFY( (extrema_max / limits_max) < (1 + epsilon) );
- VERIFY( (limits_max / extrema_max) < (1 + epsilon) );
- }
- #endif
-
template<typename T>
void test_epsilon()
{
--- 71,76 ----