gcc compiles .h files as .c source code, tcc now does the same and no longer complains with "unrecognized file type". It is however adviced to use "-x c" option which exists for this purpose in gcc and was supported by tcc.
This commit is contained in:
parent
b5d4b908c4
commit
39d586d7fc
1 changed files with 3 additions and 1 deletions
4
libtcc.c
4
libtcc.c
|
@ -1082,7 +1082,9 @@ LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename)
|
|||
filetype = AFF_TYPE_ASMPP;
|
||||
else if (!strcmp(ext, "s"))
|
||||
filetype = AFF_TYPE_ASM;
|
||||
else if (!PATHCMP(ext, "c") || !PATHCMP(ext, "i"))
|
||||
else if (!PATHCMP(ext, "c")
|
||||
|| !PATHCMP(ext, "h")
|
||||
|| !PATHCMP(ext, "i"))
|
||||
filetype = AFF_TYPE_C;
|
||||
else
|
||||
filetype |= AFF_TYPE_BIN;
|
||||
|
|
Loading…
Reference in a new issue