Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Bryan Boreham
Mon, 19 Jun 1989 20:35
Multiple inheritance bug in G++ 1.35.1-
Author: Bryan Boreham
Date: Mon, 19 Jun 1989 20:35
Date: Mon, 19 Jun 1989 20:35
44 lines
1368 bytes
1368 bytes
Example:
kewill% cat mibug.C
class Object {};
class VObject : public Object {};
class View: public VObject {};
class LineItem : public VObject {
public:
void Enable();
};
class CollectionView: public View {
public:
int selection;
};
class Menu : public CollectionView {
int selection;
public:
void Init();
void GetTitle() {}
};
void LineItem::Enable() {}
void Menu::Init()
{
selection= -1;
}
kewill% /usr/local/lib/gcc-cc1plus -version mibug.C -quiet -noreg -o /dev/null
GNU C++ version 1.35.1- (68k, MIT syntax) compiled by GNU C version 1.35.
In method void Menu::Init ():
mibug.C:26: request for member `selection' is ambiguous in multiple inheritance
lattice
I pared this down from 96K of code; the bug goes away if you change
almost anything in the above. It does catch G++ out in three files
of ET++. The temporary work-round is to replace "selection" with
"this->selection".
Bryan.
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