This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[971105] Core dump with exceptions
- To: egcs-bugs at cygnus dot com
- Subject: [971105] Core dump with exceptions
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Thu, 6 Nov 1997 19:27:08 -0500
The following code dumps core on linux when compiled *without* optimization.
struct foo { };
int f(int a, int b)
{
if (b == 0)
throw foo();
return a / b;
}
int main()
{
try {
f(0, 0);
return 0;
} catch (foo x) {
return 1;
}
}