integer_promotions() can't get SYM_NODE
PATCH 3/8 integer_promotions() can't get SYM_NODE
Signed-off-by Al Viro <[email protected]>
--- evaluate.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
evaluate.c +2 -7
@@ -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,
Signature · 1 line
1.5.0-rc2.GIT
Quoted 19 lines · Al Viro
Signed-off-by Al Viro <[email protected]>--- evaluate.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)evaluate.c +1
-1@@ -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;
evaluate.c static struct symbol *evaluate_string(struct expression *expr) · line 109
Quoted 10 lines
evaluate.c +1
-6- -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,
In addition to SYM_NODE as mentioned in the commit message, this also removes SYM_ENUM as classify_type handles that too. I'll append that to the commit message.
- Josh Triplett