diff options
| author | seyko <seyko2@gmail.com> | 2016-04-15 17:15:11 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2016-04-15 17:15:11 +0300 |
| commit | c6dc756d4e6905df8498596f5bd0c5a6aa1c6d24 (patch) | |
| tree | 06ee2a1b3b170b689f3b063c4b17e1ac60e3a19d /tcc.c | |
| parent | 16cbca281fe5d22cd3e6f548cae59d19c31d30ac (diff) | |
| download | tinycc-c6dc756d4e6905df8498596f5bd0c5a6aa1c6d24.tar.gz tinycc-c6dc756d4e6905df8498596f5bd0c5a6aa1c6d24.tar.bz2 | |
preprocessor oprtion -C (keep comments)
This is done by impression of the pcc -C option.
Usual execution path and speed are not changed.
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -98,8 +98,9 @@ static void help(void) " -Dsym[=val] define 'sym' with value 'val'\n" " -Usym undefine 'sym'\n" " -E preprocess only\n" - " -P[1] no/alternative output of #line directives with -E\n" - " -d{D|M} dump defines (only with -E)\n" + " -P[1] no/alternative output of #line directives\n" + " -d{D|M} dump defines\n" + " -C keep comments\n" "Linker options:\n" " -Ldir add library path 'dir'\n" " -llib link with dynamic or static library 'lib'\n" @@ -294,19 +295,6 @@ int main(int argc, char **argv) } } - if (s->output_type == TCC_OUTPUT_PREPROCESS) { - if (!s->outfile) { - s->ppfp = stdout; - } else { - s->ppfp = fopen(s->outfile, "w"); - if (!s->ppfp) - tcc_error("could not write '%s'", s->outfile); - } - s->dffp = s->ppfp; - if (s->dflag == 'M') - s->ppfp = NULL; - } - tcc_set_output_type(s, s->output_type); /* compile or add each files or library */ |
