diff options
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r-- | gcc/c-typeck.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index cd68a05a6cf..22d93a041c2 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -4315,6 +4315,11 @@ build_conditional_expr (location_t colon_loc, tree ifexp, bool ifexp_bcp, ret = fold_build3_loc (colon_loc, COND_EXPR, result_type, ifexp, op1, op2); else { + if (int_operands) + { + op1 = remove_c_maybe_const_expr (op1); + op2 = remove_c_maybe_const_expr (op2); + } ret = build3 (COND_EXPR, result_type, ifexp, op1, op2); if (int_operands) ret = note_integer_operands (ret); |