diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-07 19:27:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:04:08 -0700 |
commit | 6a5db3c9e9657620aa4622c356e797b281661c8b (patch) | |
tree | 44cb14139ee6efa6c95f78a08badf208d752925f /evaluate.c | |
parent | 3590d4291b588f2abd61ffee6152c837b5161bc1 (diff) | |
download | sparse-6a5db3c9e9657620aa4622c356e797b281661c8b.tar.gz |
Remove EXPR_BITFIELD entirely.
I used to think I needed it. That's no longer the case: we just
follow the "bit_offset" in the type information.
There may be cases where we inadvertently cast the information
away, and those places will break now, but that's a bug really,
not an excuse for EXPR_BITFIELD.
Diffstat (limited to 'evaluate.c')
-rw-r--r-- | evaluate.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -424,7 +424,7 @@ static struct symbol *evaluate_arith(struct expression *expr, int float_ok) static inline int lvalue_expression(struct expression *expr) { - return (expr->type == EXPR_PREOP && expr->op == '*') || expr->type == EXPR_BITFIELD; + return expr->type == EXPR_PREOP && expr->op == '*'; } static struct symbol *evaluate_ptr_add(struct expression *expr, struct symbol *ctype, struct expression **ip) @@ -1574,16 +1574,9 @@ static struct symbol *evaluate_member_dereference(struct expression *expr) expr->deref = deref; add = evaluate_offset(deref, offset); - if (ctype->type == SYM_BITFIELD) { - expr->type = EXPR_BITFIELD; - expr->bitpos = member->bit_offset; - expr->nrbits = member->bit_size; - expr->address = add; - } else { - expr->type = EXPR_PREOP; - expr->op = '*'; - expr->unop = add; - } + expr->type = EXPR_PREOP; + expr->op = '*'; + expr->unop = add; expr->ctype = member; return member; @@ -2226,9 +2219,6 @@ struct symbol *evaluate_expression(struct expression *expr) return evaluate_member_dereference(expr); case EXPR_CALL: return evaluate_call(expr); - case EXPR_BITFIELD: - warning(expr->pos, "bitfield generated by parser"); - return NULL; case EXPR_SELECT: case EXPR_CONDITIONAL: return evaluate_conditional_expression(expr); |