Author: faridz
Date: Thu Apr 3 11:32:11 2008
New Revision: 644435
URL: http://svn.apache.org/viewvc?rev=644435&view=rev
Log:
2008-04-03 Farid Zaripov <[EMAIL PROTECTED]>
* tests/localization/22.locale.num.get.cpp: Silenced warnings on 64-bit
MSVC.
(test_pvoid) Correctly exercised overflow conditions on LLP64 platforms.
Modified:
stdcxx/trunk/tests/localization/22.locale.num.get.cpp
Modified: stdcxx/trunk/tests/localization/22.locale.num.get.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.num.get.cpp?rev=644435&r1=644434&r2=644435&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.num.get.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.num.get.cpp Thu Apr 3 11:32:11
2008
@@ -56,6 +56,7 @@
/**************************************************************************/
+#include <cstddef> // for std::size_t, std::ptrdiff_t
#include <cfloat> // FLT_MAX, FLT_MIN, etc.
#include <climits> // INT_MAX, INT_MIN, etc.
#include <clocale> // for localeconv(), setlocale()
@@ -221,7 +222,7 @@
_RWSTD_CONST_CAST (charT*, gend));
}
- int gptr_off () const {
+ std::ptrdiff_t gptr_off () const {
return this->gptr () - this->eback ();
}
};
@@ -320,7 +321,7 @@
const charT *plast = pnext + std::char_traits<charT>::length (pnext);
- int consumed;
+ std::ptrdiff_t consumed;
switch (itype) {
case iter_pointer: {
@@ -2102,15 +2103,16 @@
TEST (T, PVoid (0x0000ffff), "FfFf", 4, 0, Eof);
// exercise overflow conditions
-#if ULONG_MAX == 0xffffUL
+#if defined (_RWSTD_LONG_LONG) && _RWSTD_PTR_SIZE > _RWSTD_LONG_SIZE \
+ || ULONG_MAX > 0xffffffffUL
+ const char pvmax[] = "0xffffffffffffffff";
+ const char pvmax_plus_1[] = "0x10000000000000000";
+#elif ULONG_MAX == 0xffffUL
const char pvmax[] = "0xffff";
const char pvmax_plus_1[] = "0x10000";
#elif ULONG_MAX == 0xffffffffUL
const char pvmax[] = "0xffffffff";
const char pvmax_plus_1[] = "0x100000000";
-#elif ULONG_MAX > 0xffffffffUL
- const char pvmax[] = "0xffffffffffffffff";
- const char pvmax_plus_1[] = "0x10000000000000000";
#else
// working around a SunPro bug (PR #28279)
const char pvmax[] = "0";
@@ -2196,7 +2198,7 @@
TEST (T, F (1.0e+28), "10000000000000000000000000000", 29, 0, Eof);
TEST (T, F (1.0e+29), "100000000000000000000000000000", 30, 0, Eof);
-#define VALSTR(x) floatT (x), #x, std::strlen (#x)
+#define VALSTR(x) floatT (x), #x, int (std::strlen (#x))
// exercise various forms of floating point 0