libstdc++/10485: fstream.h bug

wjlcarrot@aol.com wjlcarrot@aol.com
Thu Apr 24 19:56:00 GMT 2003


>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@aol.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:



More information about the Gcc-prs mailing list