diff options
author | Neil Booth <neilb@earthling.net> | 2000-12-11 07:45:16 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-11 07:45:16 +0000 |
commit | 0bda476066124a32156a37252d1d0c127c5a15be (patch) | |
tree | 1cf059e8adaf7964d2336feb8095b222fd1c04cb /gcc/cppfiles.c | |
parent | c5afc1922c0ac026bfd781289bfe5d067f19204a (diff) | |
download | gcc-0bda476066124a32156a37252d1d0c127c5a15be.zip gcc-0bda476066124a32156a37252d1d0c127c5a15be.tar.gz gcc-0bda476066124a32156a37252d1d0c127c5a15be.tar.bz2 |
cpperror.c (print_location): New function.
* cpperror.c (print_location): New function.
(print_containing_files): Simplify.
(_cpp_begin_message): Simplify and use print_location.
* cppfiles.c (stack_include_file): Update.
(_cpp_pop_file_buffer): Update.
* cpphash.h (struct cpp_buffer): New members
include_stack_listed and type.
* cpplib.c (_cpp_handle_directive): Buffer->inc is not null.
(run_directive): Take buffer type. cpp_push_buffer cannot fail.
(_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef,
handle_assertion): Update.
(cpp_push_buffer): Take a buffer type and file name.
(cpp_pop_buffer): Update. Clear include_stack_listed.
* cpplib.h (input_stack_listing_current): Remove.
(enum cpp_buffer_type): New.
(cpp_push_buffer): New prototype.
* cppmacro.c (builtin_macro): Simplify; buffer cannot be null.
* fix-header.c (read_scan_file): Update.
From-SVN: r38186
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index aeca30d..fccfab1 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -264,9 +264,8 @@ stack_include_file (pfile, inc) read_include_file (pfile, inc); /* Push a null buffer. */ - fp = cpp_push_buffer (pfile, NULL, 0); + fp = cpp_push_buffer (pfile, NULL, 0, BUF_FILE, inc->name); fp->inc = inc; - fp->nominal_fname = inc->name; fp->buf = inc->buffer; fp->rlimit = fp->buf; if (! DO_NOT_REREAD (inc)) @@ -287,7 +286,6 @@ stack_include_file (pfile, inc) pfile->mi_state = MI_OUTSIDE; pfile->mi_cmacro = 0; pfile->include_depth++; - pfile->input_stack_listing_current = 0; _cpp_do_file_change (pfile, FC_ENTER, filename, lineno); @@ -775,7 +773,6 @@ _cpp_pop_file_buffer (pfile, buf) pfile->system_include_depth--; if (pfile->include_depth) pfile->include_depth--; - pfile->input_stack_listing_current = 0; /* Record the inclusion-preventing macro and its definedness. */ if (pfile->mi_state == MI_OUTSIDE && inc->cmacro != NEVER_REREAD) |