diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-30 12:04:43 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-31 09:15:50 -0400 |
commit | 729aa97b799f72afdec3604f96526760701f36bc (patch) | |
tree | 35761b52e15fe48abe779a07766852717e4e9d6c /all.h | |
parent | beec05cd3b6c85af3f3cc8956f4583d9027d569d (diff) | |
download | roux-729aa97b799f72afdec3604f96526760701f36bc.tar.gz |
cleanup error handling
Diffstat (limited to 'all.h')
-rw-r--r-- | all.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/all.h b/all.h index 40c80f6..51b641a 100644 --- a/all.h +++ b/all.h @@ -6,6 +6,7 @@ #include <string.h> #define MAKESURE(what, x) typedef char make_sure_##what[(x)?1:-1] +#define die(...) die_(__FILE__, __VA_ARGS__) typedef unsigned int uint; typedef unsigned short ushort; @@ -481,7 +482,7 @@ extern char debug['Z'+1]; /* util.c */ extern Typ typ[NTyp]; extern Ins insb[NIns], *curi; -void diag(char *) __attribute__((noreturn)); +void die_(char *, char *, ...) __attribute__((noreturn)); void *emalloc(size_t); void *alloc(size_t); void freeall(void); @@ -522,7 +523,7 @@ extern OpDesc opdesc[NOp]; void parse(FILE *, char *, void (Dat *), void (Fn *)); void printfn(Fn *, FILE *); void printref(Ref, Fn *, FILE *); -void err(char *, ...); +void err(char *, ...) __attribute__((noreturn)); /* mem.c */ void memopt(Fn *); |