redo of the -dD option

functionality was broken some time ago and was removed
    by the "tccpp: fix issues, add tests"

    fix: LINE_MACRO_OUTPUT_FORMAT_NONE in pp_line()
    means: output '\n' and not "don't output at all"
This commit is contained in:
seyko
2015-05-13 12:16:00 +03:00
parent cf92f7aacb
commit 80322adaa0
4 changed files with 119 additions and 61 deletions

2
tcc.h
View File

@ -669,6 +669,7 @@ struct TCCState {
LINE_MACRO_OUTPUT_FORMAT_NONE,
LINE_MACRO_OUTPUT_FORMAT_STD,
} Pflag; /* -P switch */
int dflag; /* -dX value */
/* for -MD/-MF: collected dependencies for this compilation */
char **target_deps;
@ -1185,6 +1186,7 @@ ST_INLN void define_push(int v, int macro_type, int *str, Sym *first_arg);
ST_FUNC void define_undef(Sym *s);
ST_INLN Sym *define_find(int v);
ST_FUNC void free_defines(Sym *b);
ST_FUNC void print_defines(void);
ST_FUNC Sym *label_find(int v);
ST_FUNC Sym *label_push(Sym **ptop, int v, int flags);
ST_FUNC void label_pop(Sym **ptop, Sym *slast);