From issues-return-351-apmail-stdcxx-issues-archive=stdcxx.apache.org@stdcxx.apache.org Thu Feb 14 17:13:32 2008 Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 51395 invoked from network); 14 Feb 2008 17:13:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2008 17:13:31 -0000 Received: (qmail 48460 invoked by uid 500); 14 Feb 2008 17:13:25 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 48443 invoked by uid 500); 14 Feb 2008 17:13:25 -0000 Mailing-List: contact issues-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 issues@stdcxx.apache.org Received: (qmail 48427 invoked by uid 99); 14 Feb 2008 17:13:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 09:13:25 -0800 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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 17:12:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 11303714044 for ; Thu, 14 Feb 2008 09:13:08 -0800 (PST) Message-ID: <2230261.1203009188044.JavaMail.jira@brutus> Date: Thu, 14 Feb 2008 09:13:08 -0800 (PST) From: "Farid Zaripov (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Commented: (STDCXX-2) [MSVC] std::num_put bad formatting of 0.0 with precision and showpoint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569004#action_12569004 ] Farid Zaripov commented on STDCXX-2: ------------------------------------ __rw_fix_flt() is the better place of course and I thought of using it, to fix this issue. But this workaround is intended for zero float value only, but the value doesn't passed to the __rw_fix_flt(). If we could extend the parameters list of the __rw_fix_flt() to append the bool value indicating that val is zero (see the attached num_put.diff2 patch). > [MSVC] std::num_put bad formatting of 0.0 with precision and showpoint > ---------------------------------------------------------------------- > > Key: STDCXX-2 > URL: https://issues.apache.org/jira/browse/STDCXX-2 > Project: C++ Standard Library > Issue Type: Bug > Components: 22. Localization > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0 > Environment: Windows/MSVC > Reporter: Martin Sebor > Assignee: Farid Zaripov > Fix For: 4.2.1 > > Attachments: 22.locale.num.put.stdcxx-2.cpp, num_put.cpp.diff, num_put.cpp.diff2 > > Original Estimate: 4h > Time Spent: 2.5h > Remaining Estimate: 1.5h > > When compiled with MSVC (any version), the program below aborts at runtime. > $ cat t.cpp && cl -D_RWCONFIG=11s_msvc_7_1 -Ic:/contrib/cygwin/build/sebor/dev-hal/include -I./../../../../include -Ic:/contrib/cygwin/build/sebor/dev-hal/examples/stdlib/manual/../include -Ic:/contrib/cygwin/build/sebor/dev-hal/include/ansi -I./../../../.. > -Ic:/contrib/cygwin/build/sebor/dev-hal -Ic:/contrib/cygwin/build/sebor/dev-hal/examples/stdlib/manual -I. -nologo -GX -MLd -W3 -Zi -GA -GR -GF -GZ -c t.cpp && link -nologo /NODEFAULTLIB:libcpd /debug /LIBPATH:./../../../../lib /OUT:t.exe t.obj std11s_msvc_7_1.lib user32.lib t.cpp && ./t.exe > #include > #include > int main () > { > std::ostringstream strm; > strm.setf (strm.showpoint); > strm.precision (2); > strm << 0.0; > assert ("0.0" == strm.str ()); > } > Assertion failed: "0.0" == strm.str (), file t.cpp, line 13 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.