Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Doug Schmidt
Thu, 13 Jul 1989 18:09
inheritance bug
Author: Doug Schmidt
Date: Thu, 13 Jul 1989 18:09
Date: Thu, 13 Jul 1989 18:09
35 lines
1219 bytes
1219 bytes
Hi,
The following appears to be a bug with g++ 1.35.0:
----------------------------------------
class base
{
public:
virtual int f() { printf ("base\n"); }
};
class derived : public base
{
public:
int f() { printf ("derived\n"); }
};
main ()
{
derived d;
// should print `base', but prints `derived.'
d.base::f();
}
----------------------------------------
This works correctly with cfront 1.2. (Thanks to rfg for pointing
this out).
Doug
--
Master Swordsman speak of humility; | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth; | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada
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