Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 91506 invoked from network); 24 Oct 2007 16:24:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Oct 2007 16:24:58 -0000 Received: (qmail 94528 invoked by uid 500); 24 Oct 2007 16:24:45 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 94515 invoked by uid 500); 24 Oct 2007 16:24:45 -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 94504 invoked by uid 99); 24 Oct 2007 16:24:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 09:24:45 -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: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 16:24:49 +0000 Received: from [10.70.3.143] ([10.70.3.143]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l9OGO8RL004991 for ; Wed, 24 Oct 2007 16:24:09 GMT Message-ID: <471F71BC.3080903@roguewave.com> Date: Wed, 24 Oct 2007 10:24:28 -0600 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r587873 - /incubator/stdcxx/branches/4.2.x/tests/utilities/20.temp.buffer.mt.cpp References: <20071024122218.1BA001A9832@eris.apache.org> <471F5A57.6000500@roguewave.com> <7BDB2168BEAEF14C98F1901FD2DE64380121F570@epmsa009.minsk.epam.com> In-Reply-To: <7BDB2168BEAEF14C98F1901FD2DE64380121F570@epmsa009.minsk.epam.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Farid Zaripov wrote: >> -----Original Message----- >> From: Martin Sebor [mailto:sebor@roguewave.com] >> Sent: Wednesday, October 24, 2007 5:45 PM >> To: stdcxx-dev@incubator.apache.org >> Subject: Re: svn commit: r587873 - >> /incubator/stdcxx/branches/4.2.x/tests/utilities/20.temp.buffer.mt.cpp >> >> faridz@apache.org wrote: >>> Author: faridz >>> Date: Wed Oct 24 05:22:17 2007 >>> New Revision: 587873 >>> >>> URL: http://svn.apache.org/viewvc?rev=587873&view=rev >> [...] >>> @@ -137,10 +138,10 @@ >>> >>> #endif // _RWSTD_INT64_T >>> >>> - std::pair<_RWSTD_INT8_T*, std::ptrdiff_t> buf0; >>> - std::pair<_RWSTD_INT16_T*, std::ptrdiff_t> buf1; >>> - std::pair<_RWSTD_INT32_T*, std::ptrdiff_t> buf2; >>> - std::pair buf3; >>> + std::pair<_RWSTD_INT8_T*, std::ptrdiff_t> buf0 (0, 0); >>> + std::pair<_RWSTD_INT16_T*, std::ptrdiff_t> buf1 (0, 0); >>> + std::pair<_RWSTD_INT32_T*, std::ptrdiff_t> buf2 (0, 0); >>> + std::pair buf3 (0, 0); >> Why is this necessary? Shouldn't the default ctor zero out >> (i.e., default-initialize) its members? >> Is this is a workaround for a compiler bug? (If so, which one?) > > I think it was "just for sure". The reason I asked is because having to explicitly initialize the members by passing arguments to the ctor, even on a single platform, would mean that std::pair is broken (on that platform) and the 20.pairs.cpp test should fail. I don't know if there is a platform where it does but on the two I looked at (gcc 3.2.3 on Linux and MSVC 7.1) it passes. Martin > > Reverted back thus: > http://svn.apache.org/viewvc?view=rev&revision=587909 > > Farid.