llvm-6502/test/C++Frontend/EH/simple_throw.cpp

14 lines
179 B
C++
Raw Normal View History

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