Mail Archives: djgpp/1996/07/31/08:08:35
Hi,
I encountered an "Internal compiler error". But I cannot see any wrong with my code.
If I don't use the exceptions, the error will not occur. Please help!
Thanks in advance.
Feng, C. N.
c:>make
gcc -fhandle-exceptions -O2 -m486 -Wall -g -c -o matrix.o
matrix.cc: In method 'class Matrix &Matrix::Setup(int,int,int=0,int=0)':
matrix.cc:33 Internal compiler error.
matrix.cc:33 Please submit a full bug report to 'bug-g++@prep.ai.mit.edu'.
make.exe: ***[matrix.o] Error 1
// ******* matrix.h ***************************
class Matrix
{ public:
...
Matrix& Setup(int num_of_row,int num_of_col,
int low_row_index=0,int low_col_index=0);
...
private:
int _lower_row_index,_lower_col_index;
int _higher_row_index,_higher_col_index;
int _num_of_row,_num_of_col;
Vector *_row_vector;
};
// ******** matrix.cc *************************
Matrix& Matrix::Setup(int num_of_row,int num_of_col,
int low_row_index,int low_col_index)
{ _num_of_row=num_of_row;
_num_of_col=num_of_col;
_lower_row_index=low_row_index;
_lower_col_index=low_col_index;
_higher_row_index=low_row_index+num_of_row-1;
_higher_col_index=low_col_index+num_of_col-1;
try{
_row_vector=new Vector[_num_of_row];
if(!_row_vector)
throw("Out of memory in setup of matrix");
}// Line 33
catch(char* error){ cerr<<error<<endl; exit(1);};
for(int i=0;i<_num_of_row;i++)
_row_vector[i].Setup(_num_of_col,_lower_col_index);
return (*this);
}
- Raw text -