[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Preprocessor output
From: |
Svein Berge |
Subject: |
[Tinycc-devel] Preprocessor output |
Date: |
Sat, 14 Oct 2006 00:24:58 +0200 |
For my project (www.sourceforge.org/projects/jsext), I need a C compiler
(preferrably tiny), but also a C preprocessor. I've added a few lines of
code to add the -E option to tcc and a tcc_preprocess function to tcclib.
The -E option makes tcc stop after preprocessing and send output to stdout
(like gcc does). The tcc_preprocess function in libtcc takes C code as a
char * and returns preprocessed C code as a char *.
The preprocessor output contains preprocessed code, a list of all constant
#defines (that is, those without parameters) and # linenumber "filename"
records.
Enclosed are the diff files for libtcc.h and tcc.c. I hope this will be
included in a future release. It may be a useful feature for others, too,
adds little code and is backwards-compatible.
--
Svein Berge
tcc.c.diff
Description: Binary data
libtcc.h.diff
Description: Binary data
- [Tinycc-devel] Preprocessor output,
Svein Berge <=
- Re: [Tinycc-devel] Preprocessor output, Bernhard Fischer, 2006/10/14
- RE: [Tinycc-devel] Preprocessor output, Svein Berge, 2006/10/14
- Re: [Tinycc-devel] Preprocessor output, Rob Landley, 2006/10/15
- Re: [Tinycc-devel] Preprocessor output, Bernhard Fischer, 2006/10/16
- RE: [Tinycc-devel] Preprocessor output, Svein Berge, 2006/10/16
- RE: [Tinycc-devel] Preprocessor output, Svein Berge, 2006/10/16
- Re: [Tinycc-devel] Preprocessor output, Fabrice Bellard, 2006/10/16
- Re: [Tinycc-devel] Preprocessor output, Rob Landley, 2006/10/17
- RE: [Tinycc-devel] Preprocessor output, Svein Berge, 2006/10/16
- Re: [Tinycc-devel] Preprocessor output, Rob Landley, 2006/10/15