.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
master
seyko 2015-01-06 16:01:41 +03:00
parent 524abd46b4
commit b93179f3c0
1 changed files with 1 additions and 1 deletions

View File

@ -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;