summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorloki <loki@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-10 13:47:05 +0000
committerloki <loki@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-10 13:47:05 +0000
commitf279e1909216063f61edab39be4a61e6a236b669 (patch)
tree6381aa5b39ee6d67c9cf69d7ebad4dae77e66a24 /gcc/c-typeck.c
parent67dd4de462d7aab2b4a91d9fbcde881992e31c80 (diff)
downloadppe42-gcc-f279e1909216063f61edab39be4a61e6a236b669.tar.gz
ppe42-gcc-f279e1909216063f61edab39be4a61e6a236b669.zip
2005-05-10 Gabor Loki <loki@gcc.gnu.org>
PR c/17913 * c-typeck.c (build_conditional_expr): Remove reducing cond_expr. * fold-const.c (fold): Expand the condition of reducing cond_expr. (contains_label_1, contains_label_p): New functions for checking labels in a sub-tree. testsuite: 2005-05-10 Gabor Loki <loki@gcc.gnu.org> PR c/17913 * gcc.c-torture/compile/pr17913.c: Computed jump test for PR17913 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99514 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index d3b1c957020..806a20ade96 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -3105,10 +3105,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2)
if (result_type != TREE_TYPE (op2))
op2 = convert_and_check (result_type, op2);
- if (TREE_CODE (ifexp) == INTEGER_CST)
- return non_lvalue (integer_zerop (ifexp) ? op2 : op1);
-
- return fold (build3 (COND_EXPR, result_type, ifexp, op1, op2));
+ return fold_build3 (COND_EXPR, result_type, ifexp, op1, op2);
}
/* Return a compound expression that performs two expressions and
OpenPOWER on IntegriCloud