This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
(971016) i386-linux-gnulibc1 exception bug
- To: egcs-bugs at cygnus dot com
- Subject: (971016) i386-linux-gnulibc1 exception bug
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Fri, 17 Oct 1997 20:57:52 -0500
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
Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/