aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2007-01-13 05:39:00 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2007-01-13 05:39:00 +0000
commitd95787e646b7b5f027d7f241707aa0f297949792 (patch)
treee6f9075eb903f1a0ecf0a576fa00b45214c11b15 /gcc/c-common.c
parent6ef795d2e127b3245150c52931d16a07cae68deb (diff)
downloadgcc-d95787e646b7b5f027d7f241707aa0f297949792.zip
gcc-d95787e646b7b5f027d7f241707aa0f297949792.tar.gz
gcc-d95787e646b7b5f027d7f241707aa0f297949792.tar.bz2
tree.h (force_fit_type_double): Remove unused final argument.
* tree.h (force_fit_type_double): Remove unused final argument. * c-common.c (constant_expression_warning): Replace use of TREE_CONSTANT_OVERFLOW with TREE_OVERFLOW. (convert_and_check): Likewise. (shorten_compare): Update call to force_fit_type_double. (c_common_truthvalue_conversion) <INTEGER_CST>: Use integer_zerop. * convert.c (convert_to_pointer): Update call to force_fit_type_double. * fold-const.c (force_fit_type_double): Remove overflowed_const argument. (int_const_binop, fold_convert_const_int_from_int, fold_convert_const_int_from_real, fold_div_compare, fold_sign_changed_comparison, fold_unary, fold_negate_const, fold_abs_const, fold_not_const): Remove the final argument from calls to force_fit_type_double. From-SVN: r120746
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 217228d..4b1718c 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -918,7 +918,7 @@ constant_expression_warning (tree value)
if ((TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST
|| TREE_CODE (value) == VECTOR_CST
|| TREE_CODE (value) == COMPLEX_CST)
- && TREE_CONSTANT_OVERFLOW (value)
+ && TREE_OVERFLOW (value)
&& warn_overflow
&& pedantic)
pedwarn ("overflow in constant expression");
@@ -1257,11 +1257,8 @@ convert_and_check (tree type, tree expr)
/* Do not diagnose overflow in a constant expression merely
because a conversion overflowed. */
if (TREE_OVERFLOW (result))
- {
- TREE_CONSTANT_OVERFLOW (result) = TREE_CONSTANT_OVERFLOW (expr);
- TREE_OVERFLOW (result) = TREE_OVERFLOW (expr);
- }
-
+ TREE_OVERFLOW (result) = TREE_OVERFLOW (expr);
+
if (TYPE_UNSIGNED (type))
{
/* This detects cases like converting -129 or 256 to
@@ -2323,8 +2320,7 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
primop1 = force_fit_type_double (*restype_ptr,
TREE_INT_CST_LOW (primop1),
TREE_INT_CST_HIGH (primop1), 0,
- TREE_OVERFLOW (primop1),
- TREE_CONSTANT_OVERFLOW (primop1));
+ TREE_OVERFLOW (primop1));
}
if (type != *restype_ptr)
{
@@ -2685,10 +2681,8 @@ c_common_truthvalue_conversion (tree expr)
return expr;
case INTEGER_CST:
- /* Avoid integer_zerop to ignore TREE_CONSTANT_OVERFLOW. */
- return (TREE_INT_CST_LOW (expr) != 0 || TREE_INT_CST_HIGH (expr) != 0)
- ? truthvalue_true_node
- : truthvalue_false_node;
+ return integer_zerop (expr) ? truthvalue_false_node
+ : truthvalue_true_node;
case REAL_CST:
return real_compare (NE_EXPR, &TREE_REAL_CST (expr), &dconst0)