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++/8373: C++ I/O doesn't work under AIX


>Number:         8373
>Category:       libstdc++
>Synopsis:       C++ I/O doesn't work under AIX
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 27 16:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tudor Hulubei
>Release:        gcc-3.2
>Organization:
>Environment:
AIX 4.3.3
>Description:
C++ I/O doesn't work under AIX as of GCC 3.2.  The following program goes into an infinite loop when compiled with -g and segfaults when compiled with -O1:

#include <pthread.h>
#include <iostream>
#include <fstream>

using namespace std;

int
main()
{
    ifstream ifs("/etc/passwd", ios::in);
    if (!ifs)
        return 13;
    while (ifs.good() && !ifs.eof())
    {
        char s[1024];
        ifs.getline(s, sizeof(s));
         if (strlen(s) == 0)
            continue;
         cout << s << endl;
    }
    return 0;
}
>How-To-Repeat:

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