summaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-12 11:46:21 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-12 11:46:21 +0000
commit920b5d413dad5d969d4fb028ef4dc2f01cd07938 (patch)
treef74638e6668fd7907064468bc11254a90aefe287 /gcc/cpplib.h
parentfe5d1eb7d840670fa2019b2ed165349abf9f764f (diff)
downloadgcc-920b5d413dad5d969d4fb028ef4dc2f01cd07938.tar.gz
* cppexp.c: Don't worry about pfile->skipping.
* cpplib.c (struct if_stack): Make was_skipping unsigned char. (cpp_handle_directive): Save pfile->skipping in struct cpp_buffer for handled directives. (skip_rest_of_line): Use _cpp_lex_token after popping contexts and releasing lookaheads. (do_ifdef, do_ifndef, do_if): Use buffer->was_skipping. (do_else, do_elif, push_conditional): Update logic. (do_endif): Set buffer->was_skipping rather than pfile->skipping. (unwind_if_stack): Inline into cpp_pop_buffer. (cpp_push_buffer): Clear ifs->was_skipping for cpp_handle_directive. * cpplex.c (_cpp_lex_token): Clear skipping on EOF. Handle multiple-include optimisation. * cpplib.h (struct cpp_buffer): New member was_skipping. * cppmacro.c (_cpp_get_token): Loop whilst pfile->skipping. This works because skipping == 0 in directives. (_cpp_release_lookahead): Renamed from release_lookahead. (cpp_get_token): No need to check skipping as _cpp_get_token does this for us. No need to handle MI optimisation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index d677396e43f..8b6560dc500 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -290,6 +290,9 @@ struct cpp_buffer
for preprocessed input, command line directives, and _Pragma
buffers. */
unsigned char from_stage3;
+
+ /* Temporary storage for pfile->skipping whilst in a directive. */
+ unsigned char was_skipping;
};
/* Maximum nesting of cpp_buffers. We use a static limit, partly for