public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/5502: wrong output
@ 2002-01-26 15:16 rolando8
  0 siblings, 0 replies; 2+ messages in thread
From: rolando8 @ 2002-01-26 15:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5502
>Category:       c++
>Synopsis:       wrong output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 26 15:16:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     RoLo
>Release:        3.0.2
>Organization:
>Environment:
Red Hat 7.2 
kernel 2.4.18-pre3
AMD Athlon XP 1700+
128 DDR
Motherboard Soyo Dragon +
>Description:
I open a file to write, read and write again.
when the program finish I check the files I created and the out put is not what its suppose to be.
only the first write works!
I compiled the same program with g++ 2.96 and I got the out put I wanted. so I think this could be some kind of bug.
in the How-To-Repeat seccion I included an example code.
it creates a file named infile.txt but if I compile it with g++3 I get a wrong output in the file.
>How-To-Repeat:
#include <fstream>
#include <iostream>
int main(void)
{
  char a;
  std::fstream ipo("infile.txt", std::ios::ate |  std::ios::out);
  if (!ipo)
    { 
      std::cout << "File does not exist.";
      return -1;
    }
  ipo.put('.');
  a = ipo.get();
  ipo.put('A');
  ipo.close();
  return 1;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/5502: wrong output
@ 2002-01-27  2:12 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2002-01-27  2:12 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rolando8

Synopsis: wrong output

State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Sun Jan 27 02:12:47 2002
State-Changed-Why:
    Duplicate of libstdc++/5501.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5502


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-27 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-26 15:16 c++/5502: wrong output rolando8
2002-01-27  2:12 paolo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).