This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/10485: fstream.h bug


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]