🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7814

BC++ 3.0 vs 3.1 bug fixed?

#7814
From: Dave Martin
Date: Thu, 28 Jan 1993 15:10
36 lines
1257 bytes
I am having a problem in BC++3.0 with virtual functions.
It was compiled huge model with and without optimization, and various
other flags is dos mode.

Basically, the wrong function is being invoked.
my program is structured like this:

class base
{
..
virtual somefunc()
};

class a : public class base
{
..
virtual unrelatedfunc()
};

class b: public class base,public class someotherbase
{
..
virtual somefunc()
};

b someb;
someb->somefunc()  actually calls unrelatedfunc in class a.

I verified this with the debugger, and by putting output statements
just before the call to someb->somefunc(), and in unrelatedfunc().
needless to say, the program goes nuts because the context is totally
wrong for unrelatedfunc().

Is this a known problem? is it fixed in 3.1?

dave@csulx.weber.edu
Technical Details
Message-ID: <1993Jan28.151015.11739@fcom.cc.utah.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!gatech!news.byu.edu!ux1!fcom.cc.utah.edu!dave

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!gatech!news.byu.edu!ux1!fcom.cc.utah.edu!dave
From: dave@news.ccutah.edu (Dave Martin)
Subject: BC++ 3.0 vs 3.1 bug fixed?
Message-ID: <1993Jan28.151015.11739@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Reply-To: dave@csulx.weber.edu
Organization: University of Utah Computer Center
X-Newsreader: Tin 1.1 PL3
Date: Thu, 28 Jan 93 15:10:15 GMT
Lines: 37