dwf%hope@LANL.GOV (David W. Forslund) (10/19/89)
Another problem with g++-1.36.0- of 10/17/89 follows. The code is
illegal bug the compiler shouldn't crash:
// Interace to class time
// File ltime.h
class mytime
{
private:
float current_time;
public:
mytime()
{
current_time=0.0;
};
float get_time() { return current_time;};
void set_time(float t) {current_time = t;};
};
class mytime
{
private:
float current_time;
public:
mytime()
{
current_time=0.0;
};
float get_time() { return current_time;};
void set_time(float t) {current_time = t;};
};
Here is the crash:
Script started on Wed Oct 18 13:16:30 1989
satchmo% g++ bugs1 -c junk.C
junk.C:24: Segmentation violation
g++: Program cc1plus got fatal signal 11.
satchmo% g++ -v -c junk.C
gcc version 1.36.0- (based on GCC 1.36)
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 junk.C /usr/tmp/cca01823.cpp
GNU CPP version 1.36
/usr/local/lib/gcc-cc1plus /usr/tmp/cca01823.cpp -quiet -dumpbase junk.C -version -o /usr/tmp/cca01823.s
GNU C++ version 1.36.0- (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
junk.C:24: Segmentation violation
g++: Program cc1plus got fatal signal 11.
satchmo% ^D
script done on Wed Oct 18 13:16:57 1989