aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neil@gcc.gnu.org>2001-08-11 07:33:39 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-08-11 07:33:39 +0000
commit47d89cf3e65223298aef15f371a4e59511e0ad31 (patch)
treec6597f82b6f803c65532fe99e5912e516912053f /gcc/cppmacro.c
parent16568b922ec8cd76f86cfe0a492c298c7c4f6d67 (diff)
downloadgcc-47d89cf3e65223298aef15f371a4e59511e0ad31.zip
gcc-47d89cf3e65223298aef15f371a4e59511e0ad31.tar.gz
gcc-47d89cf3e65223298aef15f371a4e59511e0ad31.tar.bz2
c-lex.c (map): Make const.
* c-lex.c (map): Make const. (cb_file_change): Update for callback passing a line map. Don't assume we have a previous map. Remove sanity check about popping too many files. * cpperror.c (print_location): Make map const. * cppfiles.c (stack_include_file): Update; line maps now hold sysp. (cpp_make_system_header): Similarly. (search_from): Similarly. (_cpp_execute_include): Don't remember where we came from. * cpphash.h (struct cpp_buffer): Remove return_to_line, sysp. (struct cpp_reader): Make map const. (CPP_IN_SYSTEM_HEADER, _cpp_do_file_change): Update. * cpplib.c (do_line): Update; line maps now hold sysp. (cpp_push_buffer): Similarly. (_cpp_do_file_change): Similarly; callback with map instead. (cpp_get_line_maps): Constify return value. (_cpp_pop_buffer): Update. * cpplib.h (struct cpp_file_change): Remove. (struct cpp_callbacks): Update. (cpp_get_line_maps): Constify return value. * cppmacro.c (_cpp_create_definition): Update. * cppmain.c (struct printer): Constify map. (maybe_print_line): Similarly. (print_line): Similarly. Deduce flags 1 and 2 here. (cb_file_change): Update. * line-map.c (free_line_maps): Warn regardless. (add_line_map): Return pointer to const. When passed NULL to_file with LC_LEAVE, use the obvious values for the return point so the caller doesn't have to figure them out. (lookup_line): Return pointer to const. (print_containing_files): Take pointer to const. * line-map.h (struct line_map): New members reason, sysp. (add_line_map): Return pointer to const. (lookup_line): Similarly. (print_containing_files): Take pointer to const. From-SVN: r44789
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 1618e7e..8eb67e1 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -1466,7 +1466,7 @@ _cpp_create_definition (pfile, node)
&& macro->expansion[0].val.node == node);
/* To suppress some diagnostics. */
- macro->syshdr = pfile->buffer->sysp != 0;
+ macro->syshdr = pfile->map->sysp != 0;
/* Commit the memory. */
POOL_COMMIT (&pfile->macro_pool, macro->count * sizeof (cpp_token));