(971016) i386-linux-gnulibc1 exception bug
Mumit Khan
khan@xraylith.wisc.edu
Fri Oct 17 19:00:00 GMT 1997
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/
More information about the Gcc-bugs
mailing list