diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-04 13:07:06 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-04 13:07:06 +0000 |
commit | a854276aec7a199144d8c0ea8977b7dcca55adf2 (patch) | |
tree | 3c0127db39d15911aba3137af7f41daa9c7866bf /gcc/cppmacro.c | |
parent | 3cfec666406d71f8b7d7abcf9883c64117453c15 (diff) | |
download | gcc-a854276aec7a199144d8c0ea8977b7dcca55adf2.tar.gz |
* cpphash.h (FIRST, LAST, CUR, RLIMIT): New.
(struct cpp_context): Add traditional fields.
* cppmacro.c (paste_all_tokens, push_ptoken_context,
push_token_context, cpp_get_token, _cpp_backup_tokens): Update.
* cpptrad.c (skip_comment, lex_identifier,
_cpp_read_logical_line_trad, scan_out_logical_line): Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54242 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 28095f25e9e..ae5dfa92ec9 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -425,9 +425,9 @@ paste_all_tokens (pfile, lhs) inserted. In either case, the constraints to #define guarantee we have at least one more token. */ if (context->direct_p) - rhs = context->first.token++; + rhs = FIRST (context).token++; else - rhs = *context->first.ptoken++; + rhs = *FIRST (context).ptoken++; if (rhs->type == CPP_PADDING) abort (); @@ -896,8 +896,8 @@ push_ptoken_context (pfile, macro, buff, first, count) context->direct_p = false; context->macro = macro; context->buff = buff; - context->first.ptoken = first; - context->last.ptoken = first + count; + FIRST (context).ptoken = first; + LAST (context).ptoken = first + count; } /* Push a list of tokens. */ @@ -913,8 +913,8 @@ push_token_context (pfile, macro, first, count) context->direct_p = true; context->macro = macro; context->buff = NULL; - context->first.token = first; - context->last.token = first + count; + FIRST (context).token = first; + LAST (context).token = first + count; } /* Expand an argument ARG before replacing parameters in a @@ -1004,12 +1004,12 @@ cpp_get_token (pfile) /* Context->prev == 0 <=> base context. */ if (!context->prev) result = _cpp_lex_token (pfile); - else if (context->first.token != context->last.token) + else if (FIRST (context).token != LAST (context).token) { if (context->direct_p) - result = context->first.token++; + result = FIRST (context).token++; else - result = *context->first.ptoken++; + result = *FIRST (context).ptoken++; if (result->flags & PASTE_LEFT) { @@ -1118,9 +1118,9 @@ _cpp_backup_tokens (pfile, count) if (count != 1) abort (); if (pfile->context->direct_p) - pfile->context->first.token--; + FIRST (pfile->context).token--; else - pfile->context->first.ptoken--; + FIRST (pfile->context).ptoken--; } } |