From b839fb3fe943321c27cb560762bc37112dd993eb Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 4 Sep 1993 11:16:10 -0400 Subject: [PATCH] (truthvalue_conversion): A complex value is nonzero if either part is nonzero, not if both parts are nonzero. From-SVN: r5259 --- gcc/c-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index 8d10aa33e69..e4129d5f7e0 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1,5 +1,5 @@ /* Subroutines shared by all languages that are variants of C. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -1026,7 +1026,7 @@ truthvalue_conversion (expr) case COMPLEX_EXPR: return build_binary_op ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)) - ? TRUTH_AND_EXPR : TRUTH_ANDIF_EXPR), + ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), truthvalue_conversion (TREE_OPERAND (expr, 0)), truthvalue_conversion (TREE_OPERAND (expr, 1)), 0); @@ -1096,7 +1096,7 @@ truthvalue_conversion (expr) if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) return (build_binary_op ((TREE_SIDE_EFFECTS (expr) - ? TRUTH_AND_EXPR : TRUTH_ANDIF_EXPR), + ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), truthvalue_conversion (build_unary_op (REALPART_EXPR, expr, 0)), truthvalue_conversion (build_unary_op (IMAGPART_EXPR, expr, 0)), 0));