[971105] Core dump with exceptions

Hyman Rosen hymie@prolifics.com
Thu Nov 6 16:24:00 GMT 1997


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;
	}
}



More information about the Gcc-bugs mailing list