🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Karl Berry." Tue, 21 Mar 1989 19:55
segmentation violation
#1771
Author: "Karl Berry."
Date: Tue, 21 Mar 1989 19:55
26 lines
1069 bytes
The following short program causes a segmentation violation. I admit the
program is erroneous -- I'm using a class variable as a method.

This is g++ 1.34.0 on a Sun 3 running 3.4.

karl@umb.edu

class c {
public:
   void method();
   
private:
   int get_one;
};

void
c::method()
{
   int i = get_one();
}

g++ version 1.34.0
 /usr/local/gnu/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_FPU__ -Dmc68020 oops.cc /tmp/cca10910.cpp
GNU CPP version 1.34
 /usr/local/gnu/lib/gcc-c++ /tmp/cca10910.cpp -quiet -dumpbase oops.cc -noreg -version -o /tmp/cca10910.s
Program c++ got fatal signal 11.
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