aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-04-15 17:15:11 +0300
committerseyko <seyko2@gmail.com>2016-04-15 17:15:11 +0300
commitc6dc756d4e6905df8498596f5bd0c5a6aa1c6d24 (patch)
tree06ee2a1b3b170b689f3b063c4b17e1ac60e3a19d /tcc.c
parent16cbca281fe5d22cd3e6f548cae59d19c31d30ac (diff)
downloadtinycc-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.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/tcc.c b/tcc.c
index 722bd4c..e79e1fb 100644
--- a/tcc.c
+++ b/tcc.c
@@ -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 */