diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 3a1fcb48a96..6e15e611317 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -766,8 +766,8 @@ finish_switch_cond (tree cond, tree switch_stmt) because if we did, int_fits_type_p would do the wrong thing when checking case values for being in range, and it's too hard to do the right thing. */ - if (TREE_UNSIGNED (TREE_TYPE (cond)) - == TREE_UNSIGNED (TREE_TYPE (index))) + if (TYPE_UNSIGNED (TREE_TYPE (cond)) + == TYPE_UNSIGNED (TREE_TYPE (index))) cond = index; } } @@ -1838,7 +1838,7 @@ finish_unary_op_expr (enum tree_code code, tree expr) setting TREE_NEGATED_INT. */ if (code == NEGATE_EXPR && TREE_CODE (expr) == INTEGER_CST && TREE_CODE (result) == INTEGER_CST - && !TREE_UNSIGNED (TREE_TYPE (result)) + && !TYPE_UNSIGNED (TREE_TYPE (result)) && INT_CST_LT (result, integer_zero_node)) TREE_NEGATED_INT (result) = 1; overflow_warning (result); |