aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-09-11 07:00:12 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-09-11 07:00:12 +0000
commit5fddcffc8aa65cbf1695d95605a19b4d5d8f43a7 (patch)
tree943c0f0881bcaf2f5425616b1754f072979eb4b6 /gcc/cppmacro.c
parent75dcd8fe99a9b22bf81705c4c898241b042c0873 (diff)
downloadgcc-5fddcffc8aa65cbf1695d95605a19b4d5d8f43a7.zip
gcc-5fddcffc8aa65cbf1695d95605a19b4d5d8f43a7.tar.gz
gcc-5fddcffc8aa65cbf1695d95605a19b4d5d8f43a7.tar.bz2
cpphash.h (struct tokenrun): New.
* 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. From-SVN: r45534
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 81828f15..c8f0719 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -599,6 +599,7 @@ funlike_invocation_p (pfile, node, list)
pfile->state.parsing_args = 1;
pfile->state.prevent_expansion++;
+ pfile->keep_tokens++;
cpp_start_lookahead (pfile);
cpp_get_token (pfile, &maybe_paren);
cpp_stop_lookahead (pfile, maybe_paren.type == CPP_OPEN_PAREN);
@@ -613,6 +614,7 @@ funlike_invocation_p (pfile, node, list)
pfile->state.prevent_expansion--;
pfile->state.parsing_args = 0;
+ pfile->keep_tokens--;
/* Reset the position in case of failure. If success, the macro's
expansion appears where the name would have. */