Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Thu, 24 Nov 1988 00:27
g++ 1.27 allows invalid operation on derived classes
Author: "Douglas C. Schmidt"
Date: Thu, 24 Nov 1988 00:27
Date: Thu, 24 Nov 1988 00:27
36 lines
1089 bytes
1089 bytes
Hi,
I believe the following is illegal in C++. The AT&T compiler
complains that:
----------------------------------------
CC test.C:
"test.C", line 14: error: foo::foo() is from a private base class
----------------------------------------
which makes sense. However, g++ 1.27 accepts this without complaint.
Here's the code:
----------------------------------------
#include <stream.h>
class foo {
public:
foo () { ; }
};
class bar : foo {
public:
};
main () {
bar b;
}
----------------------------------------
thanks,
Doug
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