aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-07-27 10:04:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2007-07-28 18:34:23 -0400
commitf498ccb5a50df4a25021875f32fa36bad4ff778b (patch)
tree1ff152ef545ca9168b92cfd48e2bbcc005b97227 /evaluate.c
parent[PATCH] new helper: unfoul() (diff)
downloadsparse-f498ccb5a50df4a25021875f32fa36bad4ff778b.tar.gz
sparse-f498ccb5a50df4a25021875f32fa36bad4ff778b.tar.bz2
sparse-f498ccb5a50df4a25021875f32fa36bad4ff778b.zip
[PATCH] handling of typeof in evaluate_member_dereference()
We did examine_symbol_type() too late - after checking that it looks like a struct or union. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index f0b1bd4..d48fbbe 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1877,6 +1877,7 @@ static struct symbol *evaluate_member_dereference(struct expression *expr)
}
ctype = deref->ctype;
+ examine_symbol_type(ctype);
address_space = ctype->ctype.as;
mod = ctype->ctype.modifiers;
if (ctype->type == SYM_NODE) {
@@ -1888,7 +1889,6 @@ static struct symbol *evaluate_member_dereference(struct expression *expr)
expression_error(expr, "expected structure or union");
return NULL;
}
- examine_symbol_type(ctype);
offset = 0;
member = find_identifier(ident, ctype->symbol_list, &offset);
if (!member) {