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