Mail Archives: djgpp/1992/04/02/05:19:46
/*
Hello DJ,
when I try to compile this file with djgcc201/djdev106beta
with the command
gcc -v -c bvec.cc
the cc1plus - compiler runs into an infinite loop and does
not stop to get memory.
I stopped the compiler by ctrl-c after he got 16MB.
I do not know if this problem (bug) should be reported to
you or to FSF.
gcc 1.39 (djgpp 1.05) and turbo c++ has no problems with
this example.
Henning Behnke
*/
// this is file bvec.cc
#define NIL 0
class BOOL {
unsigned char value;
public:
unsigned char & val()
{return value;};
BOOL ()
{value='\0';};
BOOL (int n)
{value= n ? '\1' : '\0';};
operator int () {return value;};
BOOL operator= (BOOL x)
{ value = x.value; return *this;};
};
class BOOL_VECTOR {
int size;
BOOL * pvector;
public:
BOOL_VECTOR ()
{size = 0; pvector = (BOOL *) NIL;};
~BOOL_VECTOR ()
{if (pvector != NIL) delete (pvector + 1);size = 0;};
BOOL * & pto ()
{return pvector;};
BOOL & operator()( int i)
{return pvector[i];};
};
int main()
{ return 0; }
- Raw text -