diff options
author | Neil Booth <neilb@earthling.net> | 2000-12-09 12:06:37 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-09 12:06:37 +0000 |
commit | 28e0f040343cefbd1de6c067394ea1415fab83f8 (patch) | |
tree | 03c1db8498e9dbaa46fcb7c0ed5437d1bbb36e07 /gcc/cppfiles.c | |
parent | 1b32f732bf637e9783bf840d04cf4039944b3339 (diff) | |
download | gcc-28e0f040343cefbd1de6c067394ea1415fab83f8.zip gcc-28e0f040343cefbd1de6c067394ea1415fab83f8.tar.gz gcc-28e0f040343cefbd1de6c067394ea1415fab83f8.tar.bz2 |
cppfiles.c (NEVER_REREAD, [...]): Move from cpphash.h.
* cppfiles.c (NEVER_REREAD, DO_NOT_REREAD): Move from cpphash.h.
* cpphash.h (NEVER_REREAD, DO_NOT_REREAD, ABSOLUTE_PATH): Delete.
* cpplex.c (parse_identifier): Improve diagnostic.
(_cpp_lex_token): Return unconditionally at the end of a directive.
* cpplib.c (read_flag): Verify legality of each flag.
(end_directive): Resotre pfile->skipping before skip_rest_of_line.
(do_line): Use the new read_flag.
* cppmacro.c (struct cpp_macro, parse_arg, replace_args,
check_macro_redefinition, parse_params): Rename var_args to
variadic.
From-SVN: r38150
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 4508034..aeca30d 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -80,6 +80,16 @@ struct include_file unsigned char defined; /* cmacro prevents inclusion in this state */ }; +/* The cmacro works like this: If it's NULL, the file is to be + included again. If it's NEVER_REREAD, the file is never to be + included again. Otherwise it is a macro hashnode, and the file is + to be included again if the macro is defined or not as specified by + DEFINED. */ +#define NEVER_REREAD ((const cpp_hashnode *)-1) +#define DO_NOT_REREAD(inc) \ +((inc)->cmacro && ((inc)->cmacro == NEVER_REREAD \ + || ((inc)->cmacro->type == NT_MACRO) == (inc)->defined)) + static struct file_name_map *read_name_map PARAMS ((cpp_reader *, const char *)); static char *read_filename_string PARAMS ((int, FILE *)); |