diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-04-08 17:30:44 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:21 -0700 |
| commit | 31707e9e01fa694d4b4caafc41805d38a20a04b0 (patch) | |
| tree | 0f051cbffc3d50966048cc6e858a57e4005b5a2b | |
| parent | 50c89ca0b56c9cc7ed54fddb80e368af99a8f019 (diff) | |
| download | sparse-dev-31707e9e01fa694d4b4caafc41805d38a20a04b0.tar.gz | |
Make sure that when we parse a pointer type, we properly
move the current attributes to the target of the pointer
(and clear them for the pointer itself).
| -rw-r--r-- | parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -472,11 +472,17 @@ static struct token *pointer(struct token *token, struct ctype *ctype) while (match_op(token,'*')) { struct symbol *ptr = alloc_symbol(token->pos, SYM_PTR); ptr->ctype.modifiers = modifiers & ~MOD_STORAGE; + ptr->ctype.as = ctype->as; + ptr->ctype.context = ctype->context; + ptr->ctype.contextmask = ctype->contextmask; ptr->ctype.base_type = base_type; base_type = ptr; ctype->modifiers = modifiers & MOD_STORAGE; ctype->base_type = base_type; + ctype->as = 0; + ctype->context = 0; + ctype->contextmask = 0; token = declaration_specifiers(token->next, ctype, 1); } |
