Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 16522 invoked from network); 3 Apr 2008 18:32:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2008 18:32:35 -0000 Received: (qmail 27167 invoked by uid 500); 3 Apr 2008 18:32:33 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 27156 invoked by uid 500); 3 Apr 2008 18:32:33 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 27147 invoked by uid 99); 3 Apr 2008 18:32:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 11:32:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 18:32:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AF8901A9832; Thu, 3 Apr 2008 11:32:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r644435 - /stdcxx/trunk/tests/localization/22.locale.num.get.cpp Date: Thu, 03 Apr 2008 18:32:12 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080403183212.AF8901A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 * 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 // for std::size_t, std::ptrdiff_t #include // FLT_MAX, FLT_MIN, etc. #include // INT_MAX, INT_MIN, etc. #include // 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::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