tccpp: cleanup options -dD -dM, remove -C

The lexer is for reading files, not for writing.

Also :
- macro_is_equal(): avoid crash if redefining __FILE__
This commit is contained in:
grischka
2016-05-05 14:12:53 +02:00
parent caebbc3ee1
commit fe845cf53d
5 changed files with 198 additions and 246 deletions

5
tcc.h
View File

@ -775,7 +775,6 @@ struct TCCState {
LINE_MACRO_OUTPUT_FORMAT_STD
} Pflag; /* -P switch */
char dflag; /* -dX value */
FILE *dffp;
/* for -MD/-MF: collected dependencies for this compilation */
char **target_deps;
@ -858,7 +857,6 @@ struct TCCState {
char *option_m; /* only -m32/-m64 handled */
int print_search_dirs; /* option */
int option_r; /* option -r */
int option_C; /* option -C, keep comments when -E */
int do_bench; /* option -bench */
int gen_deps; /* option -MD */
char *deps_outfile; /* option -MF */
@ -1296,7 +1294,6 @@ ST_INLN void define_push(int v, int macro_type, TokenString *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);
@ -1453,7 +1450,7 @@ ST_FUNC void *tcc_get_symbol_err(TCCState *s, const char *name);
#ifndef TCC_TARGET_PE
ST_FUNC int tcc_load_dll(TCCState *s1, int fd, const char *filename, int level);
ST_FUNC int tcc_load_ldscript(TCCState *s1);
ST_FUNC uint8_t *parse_comment(uint8_t *p, int skip);
ST_FUNC uint8_t *parse_comment(uint8_t *p);
ST_FUNC void minp(void);
ST_INLN void inp(void);
ST_FUNC int handle_eob(void);