diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-03-08 20:37:23 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-08 20:37:23 +0000 |
commit | 38b24ee220dc8e9051d8a60a1ad52f4ff5139f80 (patch) | |
tree | 1653b79c8f978db12857348c7022fa5ac999b2f5 /gcc/cppinit.c | |
parent | dd05e4fae90b9f885f20217bd5b18ed13030314c (diff) | |
download | gcc-38b24ee220dc8e9051d8a60a1ad52f4ff5139f80.zip gcc-38b24ee220dc8e9051d8a60a1ad52f4ff5139f80.tar.gz gcc-38b24ee220dc8e9051d8a60a1ad52f4ff5139f80.tar.bz2 |
cpplib.h (parse_underflow_t, [...]): Delete.
* cpplib.h (parse_underflow_t, CPP_NULL_BUFFER): Delete.
(struct cpp_buffer): Remove fname and underflow fields.
(struct cpp_reader): Remove get_token field.
(struct include_hash): Rename to struct ihash. Add typedef to
IHASH.
(struct if_stack): Remove fname field.
(IF_STACK_FRAME): Rename to IF_STACK.
* cpperror.c (print_containing_files): Trust that there are no
macro buffers below the top file buffer.
* cppfiles.c: Replace all references to 'struct include_hash'
with 'IHASH'. Rename initialize_input_buffer to
init_input_buffer. Don't set or reference cpp_buffer->fname,
use buffer->ihash->name instead.
* cpphash.c (special_symbol): Use cpp_file_buffer. Use NULL
not CPP_NULL_BUFFER.
* cppinit.c: Use NULL not CPP_NULL_BUFFER, IF_STACK not
IF_STACK_FRAME, IHASH not struct include_hash.
* cpplib.c: Rename eval_if_expression to eval_if_expr. Remove
null_underflow. Use IF_STACK not IF_STACK_FRAME, IHASH not
struct include_hash, NULL not CPP_NULL_BUFFER. Remove all
references to cpp_buffer->fname (delete entirely, or use
->ihash->name instead) and IF_STACK->fname.
(cpp_push_buffer): Don't set new->underflow.
(do_include): Use cpp_file_buffer.
* cpphash.c (collect_formal_parameters): Remove duplicate
increment of argslen. Pedwarn in C99 mode if __VA_ARGS__ is
used as a macro argument name. Don't append "..." to namebuf
for varargs macros. After we're done scanning, go through
namebuf and make it NUL separated, not comma separated.
(_cpp_compare_defs): Remove register tag from variables.
Expect defn->argnames to be NUL separated.
(_cpp_dump_definition): Expect defn->argnames to be NUL
separated and in forward order.
* cpphash.h: Update documentation of argnames field.
From-SVN: r32430
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 04129aa..74ddd5b 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -398,7 +398,7 @@ cpp_cleanup (pfile) cpp_reader *pfile; { int i; - while (CPP_BUFFER (pfile) != CPP_NULL_BUFFER (pfile)) + while (CPP_BUFFER (pfile) != NULL) cpp_pop_buffer (pfile); if (pfile->token_buffer) @@ -420,22 +420,20 @@ cpp_cleanup (pfile) while (pfile->if_stack) { - IF_STACK_FRAME *temp = pfile->if_stack; + IF_STACK *temp = pfile->if_stack; pfile->if_stack = temp->next; free (temp); } for (i = ALL_INCLUDE_HASHSIZE; --i >= 0; ) { - struct include_hash *imp = pfile->all_include_files[i]; - while (imp) + IHASH *imp, *next; + for (imp = pfile->all_include_files[i]; imp; imp = next) { - struct include_hash *next = imp->next; - + next = imp->next; free ((PTR) imp->name); free ((PTR) imp->nshort); free (imp); - imp = next; } pfile->all_include_files[i] = 0; } @@ -846,7 +844,7 @@ cpp_finish (pfile) { struct cpp_options *opts = CPP_OPTIONS (pfile); - if (CPP_PREV_BUFFER (CPP_BUFFER (pfile)) != CPP_NULL_BUFFER (pfile)) + if (CPP_PREV_BUFFER (CPP_BUFFER (pfile)) != NULL) cpp_ice (pfile, "buffers still stacked in cpp_finish"); cpp_pop_buffer (pfile); |