From stdcxx-dev-return-1053-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Thu Mar 09 16:07:46 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 67293 invoked from network); 9 Mar 2006 16:07:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Mar 2006 16:07:44 -0000 Received: (qmail 4450 invoked by uid 500); 9 Mar 2006 16:07:39 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 4438 invoked by uid 500); 9 Mar 2006 16:07:38 -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 4427 invoked by uid 99); 9 Mar 2006 16:07:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 08:07:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of AntonP@moscow.vdiweb.com designates 195.210.189.132 as permitted sender) Received: from [195.210.189.132] (HELO mail.moscow.vdiweb.com) (195.210.189.132) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 08:07:36 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: %{#*S} inserts NULs Date: Thu, 9 Mar 2006 19:07:11 +0300 Message-ID: <4D6A8407B7AC6F4D95B0E55C4E7C4C6203D3D76C@exmsk.moscow.vdiweb.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: %{#*S} inserts NULs Thread-Index: AcZCKH2r1ywevn5sQG6kzFLtlXhNpABMTx1w From: "Anton Pevtsov" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Martin, the latest changes that you made fix the problem. Thanks, Anton Pevtsov -----Original Message----- From: Martin Sebor [mailto:sebor@roguewave.com]=20 Sent: Tuesday, March 07, 2006 23:53 To: stdcxx-dev@incubator.apache.org Subject: Re: %{#*S} inserts NULs I still can't reproduce the behavior. I tried both x86 (gcc 3.2.3) and x86_64 (gcc 3.4.4) but the test case behaves as expected. What I said I saw below must have been some kind of a fluke... What exactly is your architecture/OS/compiler/build type? Martin Martin Sebor wrote: > Anton Pevtsov wrote: >=20 >> Yes, here it is: >> >> #include >> #include >> >> int main (int argc, char** argv) >> { >> wchar_t* tmp =3D L"abc"; >> std::basic_string,=20 >> std::allocator > s (tmp, 3); >> rw_printf ("%{#*S}\n", sizeof (wchar_t), &s); >> >> return 0; >> } >> >> I got "a\0b". Maybe, I use the %{#*S} in wrong way? >=20 >=20 > No (except for passing size_t instead of int to it), but I still can't > reproduce the behavior you describe. I get L"abc" just as you expect. >=20 > Hang on a second, though. I'm testing this on Solaris/SPARC. On=20 > Linux/x86_64 I get L"a\0\0" so there clearly is a problem with the=20 > directive. Let me look into it. >=20 > Martin