🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Saumen Dutta Mon, 05 Oct 1992 03:48
gcc2.2.2 problem / bug ?
#1
Author: Saumen Dutta
Date: Mon, 05 Oct 1992 03:48
67 lines
1732 bytes
I have following problems with gcc.

While compiling the following program ( actually part of a big program
but shortened for convinience) it does'nt complain anything but while executing
it gives a BUS error. However if I interchange the position of xdisp and coord
in the definition of xwin, (i.e. class xwin: virtual public coord, virtual
public xdisp{.... ) it works fine!. Can somebody tell me what is going on.
I could not find anything from the gdb. I am using gcc2.2.2. I understand
that I didn't have to use virtual classes, but I guess it is syntactically okay!
Any feedback will be appreciated!!

 
class coord{
 public:
    double ctm[6]; 
    coord();
};

//--------------------------------------------------------

class xdisp{
  
public:
  xdisp();
};

//------------------------------------------------------------

class xwin: virtual public xdisp, virtual public coord{

public:
  xwin();

};

//----------------------------------------------------------



main()
{
	xwin tryme;
}


xwin::xwin():xdisp(), coord()
{

}


xdisp::xdisp()
{
}


coord::coord(){
	ctm[0] = (double)1.0;
	ctm[1] = ctm[2] = (double)0.0;
	ctm[4] = (double)1.0;
	ctm[5] = (double)0.0;
} 



If you decide to post the reply please send a e-mail too.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads