This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] c-tree.texi: Mention the type restriction on TRUTH_*_EXPR.(take 2)
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: roger at eyesopen dot com, dnovillo at redhat dot com
- Date: Wed, 22 Sep 2004 14:46:31 -0400 (EDT)
- Subject: [patch] c-tree.texi: Mention the type restriction on TRUTH_*_EXPR.(take 2)
- References: <20040922.142722.88482716.kazu@cs.umass.edu>
Hi,
OK to apply?
Kazu Hirata
2004-09-22 Kazu Hirata <kazu@cs.umass.edu>
* doc/c-tree.texi (TRUTH_NOT_EXPR, TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR,
TRUTH_XOR_EXPR): Mention the restriction on types.
Index: doc/c-tree.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/c-tree.texi,v
retrieving revision 1.63
diff -u -r1.63 c-tree.texi
--- doc/c-tree.texi 16 Sep 2004 15:13:34 -0000 1.63
+++ doc/c-tree.texi 22 Sep 2004 18:43:12 -0000
@@ -1908,7 +1908,9 @@
@item TRUTH_NOT_EXPR
These nodes represent logical negation, and will always have integral
-(or boolean) type. The operand is the value being negated.
+(or boolean) type. The operand is the value being negated. The type
+of the operand, and the result type, is always of @code{BOOLEAN_TYPE}
+or @code{INTEGER_TYPE}.
@item PREDECREMENT_EXPR
@itemx PREINCREMENT_EXPR
@@ -2025,7 +2027,7 @@
operators are not strict; i.e., the second operand is evaluated only if
the value of the expression is not determined by evaluation of the first
operand. The type of the operands, and the result type, is always of
-boolean or integral type.
+@code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.
@item TRUTH_AND_EXPR
@itemx TRUTH_OR_EXPR
@@ -2034,7 +2036,8 @@
They are strict; both arguments are always evaluated. There are no
corresponding operators in C or C++, but the front end will sometimes
generate these expressions anyhow, if it can tell that strictness does
-not matter.
+not matter. The type of the operands, and the result type, is
+always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.
@itemx PLUS_EXPR
@itemx MINUS_EXPR