[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#232083: marked as done ([PR 15126] [2.95 regression] ios::ate does not seek to end after opening)



Your message dated Sun, 25 Apr 2004 13:45:55 +0200
with message-id <16523.42227.344274.351953@gargle.gargle.HOWL>
and subject line [Bug libstdc++/15126] [2.95 regression] ios::ate does not seek to end after opening
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Feb 2004 19:57:46 +0000
>From g.bonacci@libero.it Tue Feb 10 11:57:46 2004
Return-path: <g.bonacci@libero.it>
Received: from mail2.webmessenger.it (mail2a.webresidence.it) [193.70.193.55] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Aqe0v-0003Gr-00; Tue, 10 Feb 2004 11:57:46 -0800
Received: from bohr.pisa.iol.it (193.76.233.84) by mail2a.webresidence.it (7.0.019)
        id 4019175F00003CDA; Tue, 10 Feb 2004 20:57:15 +0100
Received: from giuseppe by bohr.pisa.iol.it with local (Exim 4.30)
	id 1Aqe1g-0005W6-Hi; Tue, 10 Feb 2004 20:58:32 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: giuseppe bonacci <g.bonacci@libero.it>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libstdc++5: strange behaviour of ios::ate
X-Mailer: reportbug 2.39
Date: Tue, 10 Feb 2004 20:58:32 +0100
Message-Id: <E1Aqe1g-0005W6-Hi@bohr.pisa.iol.it>
Sender: peppe <g.bonacci@libero.it>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_02_10 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no 
	version=2.60-bugs.debian.org_2004_02_10
X-Spam-Level: 

Package: libstdc++5
Version: 1:3.3.2-4
Severity: normal

I am not sure this is a bug, nor that it pertains to this package, but
anyway, here it is:

//
//  compile with
//
//  g++ -W -Wall -ansi -O -D_REENTRANT -fPIC -fpic -D_FILE_OFFSET_BITS=64
//
#include <fstream>

using namespace std;

int main()
{
    {
	ofstream f("test1.out", ios::out | ios::trunc);
	f << "HI ";
    }
    {
	ofstream f("test1.out", ios::out | ios::ate);
	f << "ALL\n";
    }
    {
	ofstream f("test2.out", ios::out | ios::trunc);
	f << "HI ";
    }
    {
	ofstream f("test2.out", ios::out | ios::app);
	f << "ALL\n";
    }
}


The above piece of code, when compiled with g++-2.95, generates two
identical files test1.out and test2.out.  When compiled with g++-3.3
(and linked against libstdc++5) the generated files differ.

>From $DOC/libstdc++5-3.3-doc/libstdc++/html_user/ios__base_8h-source.html
I think the output files should be identical.

Best regards
G.B.



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bohr 2.4.24-1-686 #1 Tue Jan 6 21:29:44 EST 2004 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages libstdc++5 depends on:
ii  gcc-3.3-base                1:3.3.2-4    The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.3.2-4    GCC support library

-- no debconf information


---------------------------------------
Received: (at 232083-done) by bugs.debian.org; 25 Apr 2004 11:49:15 +0000
>From doko@cs.tu-berlin.de Sun Apr 25 04:49:15 2004
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BHi8J-0004Jj-00; Sun, 25 Apr 2004 04:49:15 -0700
Received: from bolero.cs.tu-berlin.de (doko@bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id NAA23274
	for <232083-done@bugs.debian.org>; Sun, 25 Apr 2004 13:45:55 +0200 (MET DST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id i3PBjtgq004361;
	Sun, 25 Apr 2004 13:45:55 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16523.42227.344274.351953@gargle.gargle.HOWL>
Date: Sun, 25 Apr 2004 13:45:55 +0200
To: 232083-done@bugs.debian.org
Subject: Re: [Bug libstdc++/15126] [2.95 regression] ios::ate does not seek to end after opening
In-Reply-To: <[🔎] 20040425111225.23159.qmail@sources.redhat.com>
References: <20040425093739.15126.debian-gcc@lists.debian.org>
	<[🔎] 20040425111225.23159.qmail@sources.redhat.com>
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
Delivered-To: 232083-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

pcarlini at suse dot de writes:
> 
> ------- Additional Comments From pcarlini at suse dot de  2004-04-25 11:12 -------
> Not a bug. According to Table 92 of the ISO Standard, the 'out' openmode is
> the equivalent of stdio "w", that is a new file is created or an old one is
> truncated. In other words, 'out' and 'out | trunc' lead to an identical
> behavior.
> 
> In order to achieve what you want with an ISO standard conforming library you
> need to specify 'in | out | ate': this works, since 'in | out' means "r+".
> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|                            |INVALID
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15126



Reply to: