aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
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
parentbe1c3d3c92892bfcdfaaef046cee6590a4f794a8 (diff)
downloadsparse-dev-f91d6af29636632f70613cb42aabdc9d417e355d.tar.gz
[PATCH] integer_promotions() can't get SYM_NODE or SYM_ENUM
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--evaluate.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/evaluate.c b/evaluate.c
index 7669c9af..88435da4 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,