diff options
| -rw-r--r-- | symbol.c | 7 | ||||
| -rw-r--r-- | validation/typeof-addresspace.c | 1 |
2 files changed, 6 insertions, 2 deletions
@@ -544,9 +544,12 @@ static struct symbol *examine_pointer_type(struct symbol *sym) static struct symbol *examine_typeof_helper(struct symbol *sym, bool qual) { struct symbol *base = evaluate_expression(sym->initializer); + struct ident *as = NULL; unsigned long mod = 0; - if (!base) + if (base) + as = base->ctype.as; + else base = &bad_ctype; if (base->type == SYM_NODE) { mod |= base->ctype.modifiers & MOD_TYPEOF; @@ -559,6 +562,8 @@ static struct symbol *examine_typeof_helper(struct symbol *sym, bool qual) sym->type = SYM_NODE; sym->ctype.modifiers = mod; sym->ctype.base_type = base; + if (qual) + sym->ctype.as = as; return examine_node_type(sym); } diff --git a/validation/typeof-addresspace.c b/validation/typeof-addresspace.c index a94f77a3..34ac3089 100644 --- a/validation/typeof-addresspace.c +++ b/validation/typeof-addresspace.c @@ -16,5 +16,4 @@ static void test_as(void) /* * check-name: typeof-addresspace.c - * check-known-to-fail */ |
