aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-07-02 00:43:37 -0400
committerJosh Triplett <josh@freedesktop.org>2007-07-14 12:16:52 -0700
commitf91d6af29636632f70613cb42aabdc9d417e355d (patch)
treeb1007a44f5a378b709a5e85dfede1e5d54a2dbd6 /evaluate.c
parent[PATCH] clean up evaluate_sign() (diff)
downloadsparse-f91d6af29636632f70613cb42aabdc9d417e355d.tar.gz
sparse-f91d6af29636632f70613cb42aabdc9d417e355d.tar.bz2
sparse-f91d6af29636632f70613cb42aabdc9d417e355d.zip
[PATCH] integer_promotions() can't get SYM_NODE or SYM_ENUM
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/evaluate.c b/evaluate.c
index 7669c9a..88435da 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -98,17 +98,12 @@ static struct symbol *evaluate_string(struct expression *expr)
return sym;
}
+/* type has come from classify_type and is an integer type */
static inline struct symbol *integer_promotion(struct symbol *type)
{
struct symbol *orig_type = type;
unsigned long mod = type->ctype.modifiers;
- int width;
-
- if (type->type == SYM_NODE)
- type = type->ctype.base_type;
- if (type->type == SYM_ENUM)
- type = type->ctype.base_type;
- width = type->bit_size;
+ int width = type->bit_size;
/*
* Bitfields always promote to the base type,