diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-07 00:14:33 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:02:04 -0700 |
| commit | 5a7c76825c8bb231b68897cb52a596561b39aec8 (patch) | |
| tree | d858b99deaa8fa2a972fad8f45289ac917e5f88c /pre-process.c | |
| parent | d3217ff05115ccae31dd463a9f30f708b9cb8dd2 (diff) | |
| download | sparse-dev-5a7c76825c8bb231b68897cb52a596561b39aec8.tar.gz | |
Shrink "struct token" by moving "noexpand" into the position flags.
This makes it take one bit (which we can just steal from the line
number), instead of four bytes.
Diffstat (limited to 'pre-process.c')
| -rw-r--r-- | pre-process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pre-process.c b/pre-process.c index f7d6735d..4700d222 100644 --- a/pre-process.c +++ b/pre-process.c @@ -134,7 +134,7 @@ struct token *expand_one_symbol(struct token *head, struct token *token) { struct symbol *sym; - if (token->noexpand) + if (token->pos.noexpand) return token; sym = lookup_symbol(token->ident, NS_PREPROCESSOR); @@ -193,7 +193,7 @@ static struct token *find_argument_end(struct token *start, struct token *arglis continue; } else if (token_type(next) == TOKEN_IDENT) { if (next->ident->tainted) - next->noexpand = 1; + next->pos.noexpand = 1; } else if (match_op(next, '(')) nesting++; else if (match_op(next, ')')) { @@ -217,8 +217,8 @@ static struct token *dup_token(struct token *token, struct position *streampos, token_type(alloc) = token_type(token); alloc->pos.newline = pos->newline; alloc->pos.whitespace = pos->whitespace; + alloc->pos.noexpand = token->pos.noexpand; alloc->number = token->number; - alloc->noexpand = token->noexpand; return alloc; } @@ -458,7 +458,7 @@ static struct token *expand(struct token *head, struct symbol *sym) struct ident *expanding = token->ident; if (expanding->tainted) { - token->noexpand = 1; + token->pos.noexpand = 1; return token; } |
