From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10512 invoked by alias); 3 Feb 2003 18:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10435 invoked by uid 71); 3 Feb 2003 18:16:00 -0000 Resent-Date: 3 Feb 2003 18:16:00 -0000 Resent-Message-ID: <20030203181600.10434.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, axiong@ca.ibm.com Received: (qmail 10012 invoked by uid 48); 3 Feb 2003 18:07:21 -0000 Message-Id: <20030203180720.9892.qmail@sources.redhat.com> Date: Mon, 03 Feb 2003 18:16:00 -0000 From: axiong@ca.ibm.com Reply-To: axiong@ca.ibm.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libstdc++/9548: 64-bit copiling/linking: incorrect results from setf(ios::fixed) or precision(-1) X-SW-Source: 2003-02/txt/msg00123.txt.bz2 List-Id: >Number: 9548 >Category: libstdc++ >Synopsis: 64-bit copiling/linking: incorrect results from setf(ios::fixed) or precision(-1) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Feb 03 18:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Guan-Zhu (Andrew) Xiong >Release: gcc version 3.2 >Organization: >Environment: Linux Version 2.4.19 SuSE SLES 8 (ppc) - Kernel 2.4.19-ul1-ppc64-SMP (31) >Description: => for 64-bit g++ compiling/linking: "cout.setf(ios::fixed); cout.precision (-1);" does not work as expected. => For the given C++ code, after 64-bit g++ compiling, if you run it then you will get output: ----------------- Output 30.5 as: 30 The correct output should be: ----------------- Output 30.5 as: 30.500000 => Refenece: ISO C++ standard The value passed to precision(int i) must be greater than zero. If the value is negative the floating point insertion operators will use the default value which is 6. >How-To-Repeat: 1) Compile the given code with "g++ 64-bit compiler" - e.g., /opt/cross/bin/powerpc64-linux-g++ -o hello x.C 2) Run it - hello >Fix: >Release-Note: >Audit-Trail: >Unformatted: