From a29f2ec14aa11735d7b0c781c73534a14773ee31 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 6 Jul 1993 13:59:34 -0700 Subject: [PATCH] (build_conditional_expr): All simplified results must go through pedantic_non_lvalue. From-SVN: r4865 --- gcc/c-typeck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 33b20c6514f..31aa96df999 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3590,7 +3590,7 @@ build_conditional_expr (ifexp, op1, op2) && TREE_CODE (TREE_TYPE (op1)) != FUNCTION_TYPE) { if (TREE_CODE (ifexp) == INTEGER_CST) - return (integer_zerop (ifexp) ? op2 : op1); + return pedantic_non_lvalue (integer_zerop (ifexp) ? op2 : op1); return fold (build (COND_EXPR, TREE_TYPE (op1), ifexp, op1, op2)); } @@ -3715,7 +3715,7 @@ build_conditional_expr (ifexp, op1, op2) { result_type = TREE_TYPE (op1); if (TREE_CONSTANT (ifexp)) - return (integer_zerop (ifexp) ? op2 : op1); + return pedantic_non_lvalue (integer_zerop (ifexp) ? op2 : op1); if (TYPE_MODE (result_type) == BLKmode) { @@ -3748,7 +3748,7 @@ build_conditional_expr (ifexp, op1, op2) #endif /* 0 */ if (TREE_CODE (ifexp) == INTEGER_CST) - return integer_zerop (ifexp) ? op2 : op1; + return pedantic_non_lvalue (integer_zerop (ifexp) ? op2 : op1); return fold (build (COND_EXPR, result_type, ifexp, op1, op2)); } -- 2.30.2