aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/expression.c
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-31 01:18:47 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:01:57 -0700
commite473804b0adadef366de28e42f61418306772077 (patch)
tree48e48cc26b9570a150d5c529d6b7b9325eeb5025 /expression.c
parent8bd91e0cbba1b3a40d0a05c04242e2064e72e732 (diff)
downloadsparse-dev-e473804b0adadef366de28e42f61418306772077.tar.gz
Don't get confused about "void *" nodes.
We'd incorrectly test the right type of a compatible pointer expression for "void *" without dropping off the node information. This allows us to fix a casting bug, where we used to drop the node information at the cast.
Diffstat (limited to 'expression.c')
-rw-r--r--expression.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expression.c b/expression.c
index 21333791..a8ca454b 100644
--- a/expression.c
+++ b/expression.c
@@ -399,7 +399,7 @@ static struct token *cast_expression(struct token *token, struct expression **tr
struct symbol *sym;
token = typename(next, &sym);
- cast->cast_type = sym->ctype.base_type;
+ cast->cast_type = sym;
token = expect(token, ')', "at end of cast operator");
if (match_op(token, '{')) {
token = initializer(&cast->cast_expression, token);