blob: 921b89b6be9c026bbac46094a5662d8f751e7237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
void fatal_error(const char* msg, ...) {
va_list args;
va_start(args, msg);
vfprintf(stderr, msg, args);
va_end(args);
fprintf(stderr, "\n");
exit(1);
}
#define unreachable() fatal_error("%s:%d: unreachable", __FILE__, __LINE__)
#define unimplemented() fatal_error("%s:%d: unimplemented", __FILE__, __LINE__)
|