This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: exception handling (egsc-1.0.3, linux)
- To: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: exception handling (egsc-1.0.3, linux)
- From: Harald Maier <maierh at ate dot maierh>
- Date: 28 Aug 1998 17:48:57 +0200
- CC: egcs-bugs at cygnus dot com, Thomas Binder <binder at iue dot tuwien dot ac dot at>
- References: <35E40E6C.4DC7A4D8@iue.tuwien.ac.at> <org1eiqdoy.fsf@iguacu.dcc.unicamp.br>
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