aboutsummaryrefslogtreecommitdiffstats
path: root/test/C++Frontend/EH/simple_throw.cpp
blob: 7289c6d065c8f987ec995f090aa92a97c9c3e5dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test throwing a constant int
#include <stdio.h>

static void foo() { throw 5; }
int main() {
	try {
		foo();
	} catch (...) {
		printf("All ok\n");
		return 0;
	}
	return 1;
}