This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Exception Handling broken?
- To: egcs-bugs at cygnus dot com
- Subject: Exception Handling broken?
- From: Felix von Leitner <leitner at math dot fu-berlin dot de>
- Date: Mon, 10 Nov 1997 01:25:39 +0100
Hi!
I compiled this code:
#include <iostream.h>
class foo { };
main()
{
cerr << "if the program dumps core now, exception handling is flawed.\n";
try {
throw foo();
} catch (foo &x) {
cerr << "exception caught correctly!\n";
} catch (...) {
cerr << "exception not matched correctly!\n";
}
}
like this:
$ g++ -o et et.C
$ ./et
if the program dumps core now, exception handling is flawed.
zsh: 2861 segmentation fault (core dumped) ./et
$
Using -fno-rtti or -fsjlj-exceptions did not help at all.
Any suggestions? BTW:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.14p/specs
gcc version egcs-2.90.14p 971023 (gcc2-970802 experimental)
$
Felix