This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/10485: fstream.h bug
- From: wjlcarrot at aol dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 24 Apr 2003 19:53:16 -0000
- Subject: libstdc++/10485: fstream.h bug
- Reply-to: wjlcarrot at aol dot com
>Number: 10485
>Category: libstdc++
>Synopsis: fstream.h bug
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 24 19:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: wjlcarrot at aol dot com
>Release: unknown-1.0
>Organization:
>Environment:
GCC 3.2.2 on RedHat 8.0
>Description:
fstream.h's reads spaces ifstream function reads space characters as \n characters. For example, if you have a file with only a space for a character and you try to read it in and send it to another file, the other file would have a \n character only.
>How-To-Repeat:
#include <fstream.h>
char buffer[2];
int main(char **argc, int argv[]){;
ifstream in(add the name of a file with a space character here);
ofstream out(add another filename here);
in >> buffer;
out << buffer;
};
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: