internal compiler error 980711

B. K. Oxley (binkley)@Home binkley@bigfoot.com
Wed Nov 11 10:13:00 GMT 1998


The compiler spat out:

H:\src\STLX>g++ -v main.cc -o main
Reading specs from C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\cpp.exe -lang-c++ -v -ipref
ix
C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\ -undef -D__GNUC__=2 -D__GN
UG__
=2 -D__cplusplus -D__GNUC_MINOR__=91 -Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D_
_MIN
GW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__
)) -
D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i
386_
_ -D_WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__WINNT__ -D_X86_=1 -D__S
TDC_
_=1 -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdec
l__)
) -D__declspec(x)=__attribute__((x)) -D__i386 -D__WIN32 -D__WINNT -Asystem(w
innt
) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -remap -Asystem(unix) -Acpu(i38
6) -
Amachine(i386) -Di386 -D__i386 -D__i386__ main.cc C:\TEMP\cc1faaaa.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\include\g++
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\include

C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\..\..\..\..\i386-mingw32\in
clu
de
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\include
 C:\mingw32\include\g++
 C:\mingw32\include
End of search list.
 C:\mingw32\lib\gcc-lib\i386-mingw32\egcs-2.91.57\cc1plus.exe
C:\TEMP\cc1faaaa.i
i -quiet -dumpbase main.cc -version -o C:\TEMP\ccSlaaaa.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) (i386-mingw32)
compiled
 by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).
In file included from main.cc:1:
DOMstring.h:103: Internal compiler error 980711.
DOMstring.h:103: Please submit a full bug report to `egcs-bugs@cygnus.com'.

The files are:

H:\src\STLX>type main.cc
#include "DOMstring.h"

#include <iostream>

int
main ( )
{
  u16 s[2] = { 1234, 5678 };
  DOMchar dc = s;

  std::cout << (u32) dc << std::endl;
}

H:\src\STLX>type H:\src\STLX\DOMstring.h
// Emacs, this is -*- C++ -*-

#ifndef DOMSTRING_H
#define DOMSTRING_H

#include <vector>

typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed long s32;
typedef unsigned long u32;

class utf16char
{
public:
  // We need to throw bad-arg exceptions when trying to construct from
  // bad UTF-16 surrogate cs, but don't count (yet) on the
  // compiler permitting this. --bko FIXME

  utf16char ( )
    : ch (0)
    { }

  utf16char (u8 v)
    : ch (v)
    { }

  utf16char (u16 v)
    : ch (v)
    { }

  utf16char (u32 v)
    : ch (v)
    { }

  utf16char (u8 v[4])
    : ch (v[0] << 24 | v[1] << 16 | v[2] << 8 | v[3])
    { }

  utf16char (u16 v[2])
    : ch (v[0] << 16 | v[1])
    { }

  utf16char (const utf16char& that)
    : ch (that.ch)
    { }

  utf16char& operator= (const utf16char& that)
    { ch = that.ch; return *this; }

  bool operator== (const utf16char& that) const
    { return ch == that.ch; }

  bool operator!= (const utf16char& that) const
    { return ch != that.ch; }

  bool operator< (const utf16char& that) const
    { return ch < that.ch; }

  bool operator<= (const utf16char& that) const
    { return ch <= that.ch; }

  bool operator> (const utf16char& that) const
    { return ch > that.ch; }

  bool operator>= (const utf16char& that) const
    { return ch >= that.ch; }

  utf16char& operator++ ( )
    { ++ch; return *this; }

  utf16char operator++ (int)
    { utf16char tmp = *this; ++*this; return tmp; }

  utf16char& operator-- ( )
    { --ch; return *this; }

  utf16char operator-- (int)
    { utf16char tmp = *this; --*this; return tmp; }

  // Need to throw an exception when this is a surrogate, maybe? --bko
  // FIXME
  operator u16 ( ) const
    { return ch; }

  bool surrogate ( ) const
    { return ch > 0xFFFF; }

  u32 ucs4 ( ) const
    { return ch; }

private:
  u32 ch;
};

class utf16string
{
public:

private:
  std::basic_string<utf16char> str;
};

#endif

--binkley





More information about the Gcc-bugs mailing list