egcs bug

sopwith@redhat.com sopwith@redhat.com
Mon May 11 16:15:00 GMT 1998


EST_Pathname_unix.cc: In method `class EST_TList<EST_String>
EST_Pathname::entries(int = 1) const':
EST_Pathname_unix.cc:125: Internal compiler error.
EST_Pathname_unix.cc:125: Please submit a full bug report to
`egcs-bugs@cygnus.com'.

The command line used was
gcc -fno-implicit-templates -c -O4 -Wall  -I../include EST_Pathname_unix.cc

[root@moebius SPECS]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)

The function in question follows (line 125 is the 'stat' call).

EST_StrList EST_Pathname::entries(int check_for_directories) const
{
  DIR *dir;
  EST_StrList list;

  if ((dir = opendir(this->as_directory()))!=NULL)
    {
      struct dirent *entry;

      while ((entry = readdir(dir)) != NULL)
        {
          EST_Pathname name(entry->d_name);
          struct stat buf;

          if (check_for_directories &&
              stat(this->as_directory() + name, &buf)==0 &&
              (buf.st_mode & S_IFDIR))
            list.append(name.as_directory());
          else
          else
            list.append(name);
        }
      closedir(dir);
    }

  return list;
}


Hope this helps,
-- Elliot





More information about the Gcc-bugs mailing list