aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9a2687a..2b8f733 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -963,7 +963,7 @@ fold_undefer_overflow_warnings (bool issue, const_gimple stmt, int code)
if (fold_deferred_overflow_warning != NULL
&& code != 0
&& code < (int) fold_deferred_overflow_code)
- fold_deferred_overflow_code = code;
+ fold_deferred_overflow_code = (enum warn_strict_overflow_code) code;
return;
}
@@ -2935,7 +2935,7 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
bool honor_nans = HONOR_NANS (TYPE_MODE (TREE_TYPE (ll_arg)));
enum comparison_code lcompcode = comparison_to_compcode (lcode);
enum comparison_code rcompcode = comparison_to_compcode (rcode);
- enum comparison_code compcode;
+ int compcode;
switch (code)
{
@@ -3001,8 +3001,12 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
else if (compcode == COMPCODE_FALSE)
return constant_boolean_node (false, truth_type);
else
- return fold_build2 (compcode_to_comparison (compcode),
- truth_type, ll_arg, lr_arg);
+ {
+ enum tree_code tcode;
+
+ tcode = compcode_to_comparison ((enum comparison_code) compcode);
+ return fold_build2 (tcode, truth_type, ll_arg, lr_arg);
+ }
}
/* Return nonzero if two operands (typically of the same tree node)