Reporting an error in catching exceptions
Hunter Moseley
hunter@cabm.rutgers.edu
Fri Jan 14 12:47:00 GMT 2000
Hello,
I am running egcs-200000110 and gcc-2.95.2 on RedHat Linux 6.1 on a
dual pentium III system.
Both versions is giving me the same error.
The program is the following (test4.cc) :
---------------------------------
#include <string>
class A
ÃÂ {
ÃÂ ÃÂ ÃÂ string a;
ÃÂ public :
ÃÂ ÃÂ ÃÂ virtual ~A() {}
ÃÂ };
class B
ÃÂ {
ÃÂ public :
ÃÂ ÃÂ ÃÂ virtual ~B() {}
ÃÂ };
class C : public A, public B
ÃÂ {
ÃÂ public :
ÃÂ ÃÂ ÃÂ virtual ~C() { }
ÃÂ };
int main()
ÃÂ {
ÃÂ try
ÃÂ ÃÂ ÃÂ {
ÃÂ ÃÂ ÃÂ throw C();
ÃÂ ÃÂ ÃÂ }
ÃÂ catch(B& f)
ÃÂ ÃÂ ÃÂ {
ÃÂ ÃÂ ÃÂ }
ÃÂ }
--------------------------------
The command line options and results of running are:
------------------------
% /usr/local/egcs-20000110/bin/c++ -O2 -static -DLINUX test4.cc -o
test4
% test4
Segmentation fault (core dumped)
------------------------
I am including the test4.ii.gz preprocessing file.
take care,
Hunter
--ÃÂ
Dr. Hunter Moseley --- CABM, Rutgers Univ.ÃÂ ÃÂ ÃÂ ÃÂ | hunter@cabm.rutgers.edu | (732) 235-5325
Not just a postdoc, but a fencer as well.ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ | Center for Advanced Biotechnology & Med.
ÃÂ My foil is sharp, but my tongue sharper still.| Rutgers University
ÃÂ So it's good that my foil is still sharp.ÃÂ ÃÂ ÃÂ | 679 Hoes Lane, Piscataway, NJ 08854-5638
ÃÂ
test4.ii.gz
begin:vcard
n:Moseley;Hunter
tel;work:732-234-5361
x-mozilla-html:TRUE
org:Rutgers University;Center for Advanced Biotechnology and Medicine
adr:;;679 Hoes Lane;Piscataway;New Jersey;08854-5638;
version:2.1
email;internet:hunter@cabm.rutgers.edu
title:Post Doctoral Associate
note;quoted-printable:Extra Info: I am in the laboratory =0D=0Aof Dr. Gaetano T. Montelione
x-mozilla-cpt:;-15680
fn:Dr. Hunter Moseley
end:vcard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test4.ii.gz
Type: application/x-gzip
Size: 22316 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000114/7c0fcb05/attachment.bin>
More information about the Gcc-bugs
mailing list