Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Tue, 04 Oct 1988 20:48
several problems with g++ 1.27 on sparc
Author: "Douglas C. Schmidt"
Date: Tue, 04 Oct 1988 20:48
Date: Tue, 04 Oct 1988 20:48
50 lines
1500 bytes
1500 bytes
Hi,
The following program causes several problems for g++ 1.27.
1. When compiled with the -gg and -O flags it gets a fatal signal.
2. When compiled ``normally,'' (i.e., would -gg) the resulting
code gets a segmentation fault when executed. However, it works
fine with cfront 1.2.1.
Also, there seems to be a problem with the debugger (gdb+ 2.8) running
under the Sun OS 4.0. Since ld++ doesn't recognize -Bstatic I am
generally unable to debug g++ code under 4.0. Is there a workaround
for this?
Here's the code:
----------------------------------------
#include <stream.h>
class foo {
public:
char buf[100];
foo() {
strcpy(buf,"I am the default base");
}
virtual ~foo() {
cout << buf << "\n";
}
};
class bar : foo {
public:
bar() {
strcpy(foo::buf,"I am derived constructor");
}
~bar() {
cout << "I am the derived destructor!" << "\n";
}
};
main() {
foo foobar;
bar Foobar;
}
----------------------------------------
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