Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 77067 invoked from network); 18 Sep 2007 19:19:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 19:19:18 -0000 Received: (qmail 63903 invoked by uid 500); 18 Sep 2007 19:19:10 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 63835 invoked by uid 500); 18 Sep 2007 19:19:10 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 63820 invoked by uid 99); 18 Sep 2007 19:19:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 12:19:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Farid_Zaripov@epam.com designates 217.21.63.3 as permitted sender) Received: from [217.21.63.3] (HELO EPMSA009.epam.com) (217.21.63.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 19:19:09 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: svn commit: r577002 - /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp Date: Tue, 18 Sep 2007 22:18:43 +0300 Message-ID: <7BDB2168BEAEF14C98F1901FD2DE6438F57F2C@epmsa009.minsk.epam.com> In-Reply-To: <46F01EA6.70104@roguewave.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r577002 - /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp Thread-Index: Acf6JU5ehEHW7XapR5yGhzZzytdhMQAAmnQw References: <20070918180148.0D9A51A9832@eris.apache.org> <46F01EA6.70104@roguewave.com> From: "Farid Zaripov" To: X-Virus-Checked: Checked by ClamAV on apache.org > -----Original Message----- > From: Martin Sebor [mailto:sebor@roguewave.com]=20 > Sent: Tuesday, September 18, 2007 9:53 PM > To: stdcxx-dev@incubator.apache.org > Subject: Re: svn commit: r577002 -=20 > /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp >=20 > > * 20.temp.buffer.cpp (run_test): Use _RWSTD_LONG_MAX instead > > of _RWSTD_PTRDIFF_MAX because BigStruct parametrized by > > unsigned long type and sizeof (_RWSTD_PTRDIFF_T) can be > > greater that sizeof (unsigned long). >=20 > Shouldn't that be the other way around? I mean, wouldn't a=20 > more robust solution be to parametrize BigStruct on ptrdiff_t=20 > so that it can be instantiated with the largest possible value even on > LLP64 like Windows? Are there any LLP64 platforms except Windows? Because on Windows the maximum size of the array is 0x7fffffff bytes. The following line of code: char buf [0x80000000]; inducts the error on MSVC (32 bit and 64 bit): error C2148: total size of array must not exceed 0x7fffffff bytes on ICC 9.1 (32 bit and 64 bit), 10.0 (32 bit and 64 bit): error: array is too large char buf [0x80000000]; ^ Farid.