rust/tests/run-make-fulldeps/c-unwind-abi-catch-panic/add.c
2023-01-11 09:32:08 +00:00

13 lines
263 B
C

#ifdef _WIN32
__declspec(dllexport)
#endif
// An external function, defined in Rust.
extern void panic_if_greater_than_10(unsigned x);
unsigned add_small_numbers(unsigned a, unsigned b) {
unsigned c = a + b;
panic_if_greater_than_10(c);
return c;
}