(truthvalue_conversion): A complex value is nonzero if either part is
nonzero, not if both parts are nonzero. From-SVN: r5259
This commit is contained in:
parent
25a1019f18
commit
b839fb3fe9
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user