diff options
| author | Christopher Li <chrisl@vmware.com> | 2003-08-31 16:36:31 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:01:03 -0700 |
| commit | 33145bbb99c171f5f118cd2d4a067048c74f2895 (patch) | |
| tree | b6ba14647c9aac49f6a190a6f09bf20e81f5ca70 /pre-process.c | |
| parent | ef904faf89d2a7e6d5e4611e31c72aac9f1578a1 (diff) | |
| download | sparse-dev-33145bbb99c171f5f118cd2d4a067048c74f2895.tar.gz | |
[PATCH] print out the function which causes errors
This fixes a bug in adding white space in macro expanding, which cause
drivers/atm/ambassador.c complain about include file not found and stop
the make.
The offensive macro is that
#define UCODE(x) UCODE2(atmsar11.x)
#define UCODE2(x) #x
UCODE(start)
It will expand to "atmsar11 . start" instead of "atmsar11.start"
Diffstat (limited to 'pre-process.c')
| -rw-r--r-- | pre-process.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pre-process.c b/pre-process.c index c97e41a7..4e18cd83 100644 --- a/pre-process.c +++ b/pre-process.c @@ -206,12 +206,12 @@ static struct token *find_argument_end(struct token *start, struct token *arglis return start; } -static struct token *dup_token(struct token *token, struct position *pos, int newline) +static struct token *dup_token(struct token *token, struct position *streampos, struct position *pos) { - struct token *alloc = alloc_token(pos); + struct token *alloc = alloc_token(streampos); token_type(alloc) = token_type(token); - alloc->pos.line = pos->line; - alloc->pos.newline = newline; + alloc->pos.newline = pos->newline; + alloc->pos.whitespace = pos->whitespace; alloc->integer = token->integer; return alloc; } @@ -224,16 +224,16 @@ static void insert(struct token *token, struct token *prev) static struct token * replace(struct token *parent, struct token *token, struct token *prev, struct token *list) { - int newline = token->pos.newline; + struct position *pos = &token->pos; prev->next = token->next; while (!eof_token(list) && !match_op(list, SPECIAL_ARG_SEPARATOR)) { - struct token *newtok = dup_token(list, &token->pos, newline); + struct token *newtok = dup_token(list, &token->pos, pos); newtok->parent = parent; - newline = 0; insert(newtok, prev); prev = newtok; list = list->next; + pos = &list->pos; } return prev; } |
