diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-08-11 08:02:54 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-08-11 08:02:54 +0000 |
commit | f80f7e8cd8e2b88fc2e9c8025f2e2c228f1b68ec (patch) | |
tree | dfc3479970901e5fe830c8e6d7d22f9e647049c6 /gcc | |
parent | 47d89cf3e65223298aef15f371a4e59511e0ad31 (diff) | |
download | gcc-f80f7e8cd8e2b88fc2e9c8025f2e2c228f1b68ec.zip gcc-f80f7e8cd8e2b88fc2e9c8025f2e2c228f1b68ec.tar.gz gcc-f80f7e8cd8e2b88fc2e9c8025f2e2c228f1b68ec.tar.bz2 |
cpphash.h, cpplib.c: Correct erroneous previous checkin.
* cpphash.h, cpplib.c: Correct erroneous previous checkin.
Co-Authored-By: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
From-SVN: r44790
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 39 | ||||
-rw-r--r-- | gcc/cpphash.h | 2 | ||||
-rw-r--r-- | gcc/cpplib.c | 6 |
3 files changed, 42 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29440f5..825bd12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,42 @@ +2001-08-11 Neil Booth <neil@daikokuya.demon.co.uk> + Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + + * 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. + 2001-08-10 Roman Zippel <zippel@linux-m68k.org> Richard Henderson <rth@redhat.com> diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 366655b..cbca913 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -66,7 +66,7 @@ struct cpp_chunk typedef struct cpp_pool cpp_pool; struct cpp_pool { - struct cpp_chunk *cur, *locked, *first; + struct cpp_chunk *cur, *locked; unsigned char *pos; /* Current position. */ unsigned int align; unsigned int locks; diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 9404a00..719daaa 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -901,8 +901,7 @@ cpp_register_pragma (pfile, space, name, handler) } found: - new = (struct pragma_entry *) - _cpp_pool_alloc (&pfile->macro_pool, sizeof (struct pragma_entry)); + new = xnew (struct pragma_entry); new->name = name; new->len = strlen (name); new->isnspace = 0; @@ -930,8 +929,7 @@ cpp_register_pragma_space (pfile, space) p = p->next; } - new = (struct pragma_entry *) - _cpp_pool_alloc (&pfile->macro_pool, sizeof (struct pragma_entry)); + new = xnew (struct pragma_entry); new->name = space; new->len = len; new->isnspace = 1; |