exception handling (egsc-1.0.3, linux)

Harald Maier maierh@ate.maierh
Fri Aug 28 08:52:00 GMT 1998


I tried the test program too and I didn't get an error. But I have an
similar problem when I throw an exception in an ostream manipulator. I
will try to build a small test context.

Harald Maier

My configuration:
  Linux ate 2.0.34 #11 Thu Jun 18 07:36:24 MET DST 1998 i686 unknown
  Reading specs from 
   /usr/local/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.90.29/specs
  gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)

Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> Thomas Binder <binder@iue.tuwien.ac.at> writes:
> 
> > It seems that an exception cannot be caught if it is thrown in a function
> > which is called via a function pointer. The program terminates with the
> > message 
> 
> > 	IOT trap/Abort
> 
> I can't reproduce your problem with egcs 1.0.3 on RedHat Linux
> 5.1/alpha nor RedHat Linux 5.0/x86.  Are you sure g++ is really egcs
> 1.0.3?  Isn't it linking your program with some other version of
> libstdc++ or libgcc?  What does the command below print?
> 
>   g++ -v -Wl,-v bug.cc -o bug
> 
> > #include <iostream.h>
> > void f1 ();
> > void f2 (void (*ff)());
> > class ERR {};
> > int main () {
> >   try { f1 (); } catch (ERR) { cout << "Caught ERR" << endl; }
> >   try { f2 (f1); } catch (ERR) { cout << "Caught ERR" << endl; } }
> > void f1 () { throw ERR (); }
> > void f2 (void (*ff)()) { (*ff) (); }
> 
> -- 
> Alexandre Oliva
> mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
> http://www.dcc.unicamp.br/~oliva
> Universidade Estadual de Campinas, SP, Brasil



More information about the Gcc-bugs mailing list