From b93179f3c077977ff64053ee61c3bebbd1d5a940 Mon Sep 17 00:00:00 2001 From: seyko Date: Tue, 6 Jan 2015 16:01:41 +0300 Subject: [PATCH] .i as file extension Add a ".i" extension as alias for ".c" GCC and file extensions: .i C source code which should not be preprocessed. Before a patch: ./tcc -E tccasm.c -o tccasm.i ./tcc -c tccasm.i -o tccasm.o tccasm.i:1: error: unrecognized file type --- libtcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtcc.c b/libtcc.c index 6eea9a7..c6bc067 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1154,7 +1154,7 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags) goto the_end; } - if (!ext[0] || !PATHCMP(ext, "c")) { + if (!ext[0] || !PATHCMP(ext, "c") || !PATHCMP(ext, "i")) { /* C file assumed */ ret = tcc_compile(s1); goto the_end;