libstdc++/2897
bkoz@gcc.gnu.org
bkoz@gcc.gnu.org
Tue May 22 13:26:00 GMT 2001
The following reply was made to PR libstdc++/2897; it has been noted by GNATS.
From: bkoz@gcc.gnu.org
To: bkoz@gcc.gnu.org, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
pompl@ls11.cs.uni-dortmund.de
Cc:
Subject: Re: libstdc++/2897
Date: 22 May 2001 20:20:57 -0000
Synopsis: Segmentation fault by calling methods of ifstream
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Tue May 22 13:20:57 2001
Responsible-Changed-Why:
Responsible
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Tue May 22 13:20:57 2001
State-Changed-Why:
Your example is not self-contained. Here's my best guess:
// libstdc++/2897
#include <iostream>
#include <fstream>
int main()
{
using namespace std;
const char* dateiname = "tmp";
ifstream eingabe(dateiname);
if (!eingabe)
{
cerr << "Datei '" << dateiname << "' konnte nicht geoeffnet werden!\n";
cerr.flush();
exit(5);
}
cerr << "Position: " << eingabe.tellg() << "\n";
cerr.flush();
eingabe.seekg(0,ios::end);
return 0;
}
This fails to produce an error though:
%./a.out
Datei 'tmp' konnte nicht geoeffnet werden!
This may be because the c++ library being used is a complete re-write of what you've been using with gcc-2.53.
Please try some example code using the codesourcery.com trial compilation page, and let me know if the problem is indeed fixed.
thanks,
benjamin
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2897&database=gcc
More information about the Gcc-prs
mailing list