|
From: | Christian Jullien |
Subject: | Re: [Tinycc-devel] Proposal to allow tcc to compile header files |
Date: | Sun, 27 Jun 2021 08:23:43 +0200 |
Tcc already accepts –x option which is compatible with gcc. If no –x c option is supplied, gcc compiles a .h as if it was a .c file but tcc complains. So, tcc will be more compatible with gcc if it does the same (i.e. w.o. –x c option). $ gcc -x c foo.h –o foo $ tcc -x c foo.h –o foo To be complete, it should also support –Tc option on Windows which is what VC++ does to compile any extension as a C file. c:>cl -nologo -Tc foo.h foo.h C. From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Arthur Williams I've noticed some programs (eg strace) fail to compile with tcc because they try to compile a header and tcc fails with "unrecognized file type". Compiling the header as if it was a ".c" seems like a safe thing to do and is a simple patch. |
[Prev in Thread] | Current Thread | [Next in Thread] |