Thread View: gnu.g++.help
1 messages
1 total messages
Started by Ron Sommeling
Mon, 13 Apr 1992 15:05
Rational class bug?
Author: Ron Sommeling
Date: Mon, 13 Apr 1992 15:05
Date: Mon, 13 Apr 1992 15:05
26 lines
1509 bytes
1509 bytes
I'm trying to use the Rational class of GNU C++.
The following program gives a segmentation fault at execution time:
===============================================================================
#include <iostream.h>
#include <Rational.h>
main() {
cout << Rational(2,3) << endl;
}
===============================================================================
% g++ -v t.cc
Reading specs from /usr/local/lib/gcc/sun4/2.0/specs
gcc version 2.0
/usr/local/lib/gcc/sun4/2.0/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/cca29969.cpp
GNU CPP version 2.0 (sparc)
/usr/local/lib/gcc/sun4/2.0/cc1plus /usr/tmp/cca29969.cpp -quiet -dumpbase t.cc -version -o /usr/tmp/cca29969.s
GNU C++ version 2.0 (sparc) compiled by GNU C version 2.0.
as -o t.o /usr/tmp/cca29969.s
ld -e start -dc -dp /lib/crt0.o -L/usr/local/lib/gcc/sun4/2.0/ -L/usr/local/lib/gcc/ -L/usr/local/lib/ t.o -lg++ -lgcc -lc -lgcc
% ./a.out
Segmentation fault
Does anyone know whether this is a library bug or a compiler bug?
It used to work with g++ 1.39. Any help is appreciated.
Ron Sommeling <Ron.Sommeling@cwi.nl>
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