summaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 07:00:12 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 07:00:12 +0000
commit83dcbb5c2cda40183ea0c159c0d5a418b46b3509 (patch)
tree943c0f0881bcaf2f5425616b1754f072979eb4b6 /gcc/cpplib.c
parent3dc88cea431f903b55fbc215a99da441f0f827ca (diff)
downloadgcc-83dcbb5c2cda40183ea0c159c0d5a418b46b3509.tar.gz
* cpphash.h (struct tokenrun): New.
(struct cpp_context): New member bol. (struct cpp_reader): New members. (_cpp_init_tokenrun): New. * cppinit.c (cpp_create_reader): Set up the token runs. * cpplex.c (lex_directive, lex_token, next_tokenrun): New. (lex_token): New internalised version of _cpp_lex_token. Don't handle directives or the multiple include opimisation here any more. Simply lex a token. * cpplib.c (run_directive): Clear bol. (_cpp_pop_buffer): Set bol. * cppmacro.c (funlike_invocation_p): Keep tokens whilst parsing arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 0a02c15845e..ada34b5717f 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -402,6 +402,7 @@ run_directive (pfile, dir_no, buf, count)
cpp_push_buffer (pfile, (const U_CHAR *) buf, count,
/* from_stage3 */ true, 1);
start_directive (pfile);
+ pfile->state.bol = 0;
pfile->state.prevent_expansion++;
pfile->directive = &dtable[dir_no];
(void) (*pfile->directive->handler) (pfile);
@@ -1782,6 +1783,7 @@ _cpp_pop_buffer (pfile)
case of a missing #endif. */
pfile->lexer_pos.output_line = pfile->line;
pfile->state.skipping = 0;
+ pfile->state.bol = 1;
/* Update the reader's buffer before _cpp_do_file_change. */
pfile->buffer = buffer->prev;