--- tccpp.c.1 2010-11-02 23:25:03.000000000 +0100 +++ tccpp.c 2010-11-12 17:39:32.000000000 +0100 @@ -1186,6 +1186,8 @@ } } +static int ignore_include_errors; + /* is_bof is true if first non space token at beginning of file */ static void preprocess(int is_bof) { @@ -1271,6 +1273,10 @@ c = '>'; } } + if (!strcmp(buf, "ignore_include_errors")) { + ignore_include_errors=1; + goto include_done; + } if (s1->include_stack_ptr >= s1->include_stack + INCLUDE_STACK_SIZE) error("#include recursion too deep"); @@ -1351,6 +1357,7 @@ ch = file->buf_ptr[0]; goto the_end; } + if (!ignore_include_errors) error("include file '%s' not found", buf); include_done: break;