From 68626d4f0ec86b2d7941be9d99c1a8b9ac8cb440 Mon Sep 17 00:00:00 2001
From: Mark Mitchell <mark@codesourcery.com>
Date: Sun, 18 Feb 2001 06:53:19 +0000
Subject: fold-const.c (fold_binary_op_with_conditional_arg): New function,
 split out from ...

	* fold-const.c (fold_binary_op_with_conditional_arg): New
	function, split out from ...
	(fold): ... here.
	* tree.def (COND_EXPR): Document the use of VOID_TYPE for
	conditional arms that throw exceptions.

From-SVN: r39822
---
 gcc/tree.def | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'gcc/tree.def')

diff --git a/gcc/tree.def b/gcc/tree.def
index c59f7f2..4ccd6e3 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -425,8 +425,10 @@ DEFTREECODE (TARGET_EXPR, "target_expr", 'e', 4)
    Operand 0 is the condition.
    Operand 1 is the then-value.
    Operand 2 is the else-value.
-   Operand 0 may be of any type, but the types of operands 1 and 2
-   must be the same and the same as the type of this expression.  */
+   Operand 0 may be of any type.
+   Operand 1 must have the same type as the entire expression, unless
+   it unconditionally throws an exception, in which case it should
+   have VOID_TYPE.  The same constraints apply to operand 2.  */
 DEFTREECODE (COND_EXPR, "cond_expr", 'e', 3)
 
 /* Declare local variables, including making RTL and allocating space.
-- 
cgit v1.1

