🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #88

Rational class

#88
From: Ron Sommeling
Date: Wed, 15 Apr 1992 07:48
24 lines
1392 bytes
There seems to be a bug in the Rational class of libg++ 2.0.
The following program is compiled with g++ 2.1 on a SPARCstation 1 running
SunOS 4.1.1

Ron Sommeling <Ron.Sommeling@cwi.nl>

% cat t.cc  
#include <iostream.h>
#include <Rational.h>

main() {
  cout << Rational(2,3) << endl;
}
% g++ -v t.cc
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.1/specs
gcc version 2.1
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix t.cc /usr/tmp/cca02232.i
GNU CPP version 2.1 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.1/cc1plus /usr/tmp/cca02232.i -quiet -dumpbase t.cc -version -o /usr/tmp/cca02232.s
GNU C++ version 2.1 (sparc) compiled by GNU C version 2.1.
 as -o t.o /usr/tmp/cca02232.s
 ld -e start -dc -dp /lib/crt0.o -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.1/ -L/usr/local/lib/ t.o -lg++ -lgcc -lc -lgcc
% ./a.out
Segmentation fault
Technical Details
Message-ID: <5857@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cwi.NL!Ron.Sommeling

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cwi.NL!Ron.Sommeling
From: Ron.Sommeling@cwi.NL (Ron Sommeling)
Subject: Rational class
Message-ID: <5857@charon.cwi.nl>
Sender: gnulists@ai.mit.edu
Organization: CWI, Amsterdam
Distribution: gnu
Date: Wed, 15 Apr 1992 07:48:12 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 25