[gccsdk] [Bug 208] New: Stack trace running !PDF after building with HEAD revision of GCCSDK

bugzilla-daemon at riscos.info bugzilla-daemon at riscos.info
Fri Jun 25 11:53:24 PDT 2010


http://www.riscos.info/bugzilla3/show_bug.cgi?id=208

           Summary: Stack trace running !PDF after building with HEAD
                    revision of GCCSDK
           Product: GCC/GCCSDK
           Version: other
          Platform: Other
        OS/Version: RISC OS
            Status: NEW
          Severity: normal
          Priority: P1
         Component: C++ compiler
        AssignedTo: John.Tytgat at aaug.net
        ReportedBy: chrisg at care4free.net
   Estimated Hours: 0.0


If I build !PDF with the current version of GCCSDK I get a stack trace on
startup.
Whereas the same program built with revision 4623 of GCCSDK works fine.

Here's some example code from !PDF that exhibits the problem.


#include <fstream>
#include <string>
#include <stdlib.h>
#include <iostream>

using namespace std;

string getChoicesFilePath(const char* leafname)
{
  static string path;
  if (path.size()==0)
  {

    if (path.size()==0) path="<PDF$dir>.";

  }
  return path+leafname;
}

int main(void)
{
   string file=getChoicesFilePath("Setup");
  char buf[128];
  ifstream in(file.c_str());
  if (!in)
  {
    cout << "Cannot open File!" << endl;
    return 1;
  }

  while (in.getline(buf,sizeof(buf)))
  {

    cout << buf << endl;

  }

  return 0;

}

-- 
Configure bugmail: http://www.riscos.info/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the gcc mailing list