aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-07-05 05:33:57 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-07-05 05:33:57 +0000
commitc71f835b2549f6b787732b5e326c5c23dbb1f66b (patch)
tree0faabdcd2aa742b82e58d484b96722dd2b861e6e /gcc/cpplib.h
parent1bbee75bcc0d3948fb1e55da6a3547cddeb000a0 (diff)
downloadgcc-c71f835b2549f6b787732b5e326c5c23dbb1f66b.zip
gcc-c71f835b2549f6b787732b5e326c5c23dbb1f66b.tar.gz
gcc-c71f835b2549f6b787732b5e326c5c23dbb1f66b.tar.bz2
cpplex.c: Don't include sys/mman.h.
toplevel: * cpplex.c: Don't include sys/mman.h. (cpp_push_buffer, cpp_pop_buffer): Moved to cpplib.c. * cpplib.c: Include sys/mman.h and obstack.h. (cpp_push_buffer): Moved from cpplex.c; allocate buffers on an obstack. (cpp_pop_buffer): Moved from cpplex.c; free buffers from an obstack. (_cpp_unwind_if_stack): Now static, unwind_if_stack. Don't bother freeing if stack entries (they will be freed with their buffer). (do_endif): Free if stack entries from the buffer obstack. (push_conditional): Allocate if stack entries from the buffer obstack. (find_answer): Rename to _cpp_find_answer. (do_assert, do_unassert): Update. * cpphash.h: Update prototypes. (xobnew): New convenience macro. * cpplib.h (struct cpp_reader): Add hash_ob and buffer_ob fields. Update comments. (struct cpp_hashnode): Remove disabled field. * cppinit.c: Don't include hashtab.h or splay-tree.h. (report_missing_guard): Moved to cppfiles.c. (cpp_reader_init): Call cpp_init_stacks, cpp_init_macros, cpp_init_includes. (cpp_cleanup): Call cpp_cleanup_stacks, cpp_cleanup_macros, cpp_cleanup_includes. Don't destroy hashtab or all_include_files here. (cpp_finish): Use _cpp_report_missing_guards. * cppfiles.c (report_missing_guard): Moved from cppinit.c. (_cpp_init_include_table): Rename _cpp_init_includes. (_cpp_cleanup_includes, _cpp_report_missing_guards): New. * cppexp.c (parse_assertion): Update for new name of find_answer. * Makefile.in (cpplib.o, cpphash.o, cppinit.o): Update deps. * cpplib.c (do_ident): s/VSPACE/EOF/ testsuite: * gcc.dg/cpp/ident.c: New test. From-SVN: r34870
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 2040f30..1c516a6 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -476,7 +476,7 @@ struct cpp_reader
/* Hash table of macros and assertions. See cpphash.c */
struct htab *hashtab;
- /* Hash table of other included files. See cppfiles.c */
+ /* Tree of other included files. See cppfiles.c */
struct splay_tree_s *all_include_files;
/* Chain of `actual directory' file_name_list entries,
@@ -527,6 +527,14 @@ struct cpp_reader
/* Buffer of -M output. */
struct deps *deps;
+ /* Obstack holding all macro hash nodes. This never shrinks.
+ See cpphash.c */
+ struct obstack *hash_ob;
+
+ /* Obstack holding buffer and conditional structures. This is a
+ real stack. See cpplib.c */
+ struct obstack *buffer_ob;
+
/* User visible options. */
struct cpp_options opts;
@@ -625,7 +633,6 @@ struct cpp_hashnode
unsigned int hash; /* cached hash value */
unsigned short length; /* length of name */
ENUM_BITFIELD(node_type) type : 8; /* node type */
- char disabled; /* macro turned off for rescan? */
union
{