diff options
Diffstat (limited to 'code/tools/lcc/lib/yynull.c')
-rw-r--r-- | code/tools/lcc/lib/yynull.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/code/tools/lcc/lib/yynull.c b/code/tools/lcc/lib/yynull.c new file mode 100644 index 0000000..7dbc968 --- /dev/null +++ b/code/tools/lcc/lib/yynull.c @@ -0,0 +1,12 @@ +#include <stdio.h> +#include <stdlib.h> + + +void _YYnull(char *file, int line) { + fprintf(stderr, "null pointer dereferenced:"); + if (file) + fprintf(stderr, " file %s,", file); + fprintf(stderr, " line %d\n", line); + fflush(stderr); + abort(); +} |