(971016) i386-linux-gnulibc1 exception bug
Jeffrey A Law
law@cygnus.com
Sat Nov 1 21:46:00 GMT 1997
In message <199710180157.UAA08866@eh_pc11.xraylith.wisc.edu>you write:
> Looks like exceptions fail unless I specify sjlj on i386-linux-gnulibc1.
> Configured with "--enable-shared".
>
> ====== cut here
> #include <iostream.h>
>
> void foo (int i)
> {
> if (i == 0)
> throw 5;
> }
>
> int main()
> {
> try {
> foo (0);
> }
> catch(int x) {
> cerr << "Caught exception: " << x << endl;
> return 0;
> }
> return 1;
> }
>
> ====== cut here
>
> % c++ -o except except.cc
> % ./except
> Abort (core dumped)
>
> % c++ -o except except.cc -fsjlj-exceptions
> % ./except
> Caught exception: 5
Just an FYI -- this works for me with the latest sources; you
should try your test again as soon as I make the next snapshot.
jeff
More information about the Gcc-bugs
mailing list