This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: numeric_limits
- From: Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 25 Sep 2002 00:47:15 +0200 (CEST)
- Subject: Re: numeric_limits
I verified that your patch does indeed fix the problem described in PR
libstdc++/7851.
I suggest applying the appended or a similar patch to
libstdc++-v3/testsuite/18_support/numeric_limits.cc, if you like.
Thank you for investigating and fixing the bug. Please close both PRs
libstdc++/7851 and libstdc++/7753.
Hope this helps,
Peter Schmid
2002-09-24 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
* testsuite/18_support/numeric_limits.cc: Check the maximum
and minimum values of the wchar_t type
*** numeric_limits.cc.orig Wed Sep 25 00:37:07 2002
--- numeric_limits.cc Wed Sep 25 00:40:11 2002
***************
*** 25,30 ****
--- 25,35 ----
#include <limits>
#include <limits.h>
#include <float.h>
+
+ #if _GLIBCPP_USE_WCHAR_T
+ #include <wchar.h>
+ #endif //_GLIBCPP_USE_WCHAR_T
+
#include <testsuite_hooks.h>
template<typename T>
*************** DEFINE_EXTREMA(int, INT_MIN, INT_MAX);
*** 47,52 ****
--- 52,61 ----
DEFINE_EXTREMA(unsigned, 0U, UINT_MAX);
DEFINE_EXTREMA(long, LONG_MIN, LONG_MAX);
DEFINE_EXTREMA(unsigned long, 0UL, ULONG_MAX);
+
+ #if _GLIBCPP_USE_WCHAR_T
+ DEFINE_EXTREMA(wchar_t, WCHAR_MIN, WCHAR_MAX);
+ #endif //_GLIBCPP_USE_WCHAR_T
DEFINE_EXTREMA(float, FLT_MIN, FLT_MAX);
DEFINE_EXTREMA(double, DBL_MIN, DBL_MAX);