aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-10-17 17:40:12 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-10-17 17:40:12 +0000
commit7192e1387baa0b2d9541b1b1a3da9451461cc23c (patch)
tree65d9d88b0479b1de4cb21d346ad253009d75775f
parenta42cd965521407872308f03bea01f1bb5bd8303d (diff)
downloadgcc-7192e1387baa0b2d9541b1b1a3da9451461cc23c.zip
gcc-7192e1387baa0b2d9541b1b1a3da9451461cc23c.tar.gz
gcc-7192e1387baa0b2d9541b1b1a3da9451461cc23c.tar.bz2
dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
* dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR. * ir.texi: Clean up documentation of RETURN_INIT. From-SVN: r30056
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/dump.c1
-rw-r--r--gcc/cp/ir.texi33
3 files changed, 24 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8163828..996d713 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+1999-10-17 Mark Mitchell <mark@codesourcery.com>
+
+ * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
+
+ * ir.texi: Clean up documentation of RETURN_INIT.
+
1999-10-15 Greg McGary <gkm@gnu.org>
* lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index b38961e..6ba8321 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -773,6 +773,7 @@ dequeue_and_dump (di)
case ADDR_EXPR:
case INDIRECT_REF:
case THROW_EXPR:
+ case CLEANUP_POINT_EXPR:
/* These nodes are unary, but do not have code class `1'. */
dump_child ("op 0", TREE_OPERAND (t, 0));
break;
diff --git a/gcc/cp/ir.texi b/gcc/cp/ir.texi
index fd21cf3..df9c5db 100644
--- a/gcc/cp/ir.texi
+++ b/gcc/cp/ir.texi
@@ -1124,22 +1124,7 @@ use of the particular value given by @code{DECL_INITIAL}.
The @code{DECL_SAVED_TREE} macro will give the complete body of the
function. This node will usually be a @code{COMPOUND_STMT} representing
the outermost block of the function, but it may also be a
-@code{TRY_BLOCK} or a @code{RETURN_INIT}.
-
-If the function has a function try-block, the @code{DECL_SAVED_TREE}
-will be a @code{TRY_BLOCK}. The @code{TRY_STMTS} will then be either a
-@code{RETURN_INIT}, or a @code{COMPOUND_STMT}.
-
-If the function uses the G++ ``named return value'' extension, meaning
-that the function has been defined like:
-@example
-S f(int) return s @{...@}
-@end example
-the @code{DECL_SAVED_TREE} will be a @code{RETURN_INIT}. The
-@code{TREE_CHAIN} of the @code{RETURN_INIT} will be the
-@code{COMPOUND_STMT} representing the body of the function. There is
-never a named returned value for a constructor. FIXME: Document how the
-@code{RETURN_INIT} can be used.
+@code{TRY_BLOCK}, a @code{RETURN_INIT}, or any other valid statement.
@subsection Statements
@@ -1343,6 +1328,22 @@ statement can be obtained with the @code{LABEL_STMT_LABEL} macro. The
@code{IDENTIFIER_NODE} giving the name of the label can be obtained from
the @code{LABEL_DECL} with @code{DECL_NAME}.
+@item RETURN_INIT
+
+If the function uses the G++ ``named return value'' extension, meaning
+that the function has been defined like:
+@example
+S f(int) return s @{...@}
+@end example
+then there will be a @code{RETURN_INIT}. There is never a named
+returned value for a constructor. The first argument to the
+@code{RETURN_INIT} is the name of the object returned; the second
+argument is the initializer for the object. The object is initialized
+when the @code{RETURN_INIT} is encountered. The object referred to is
+the actual object returned; this extension is a manual way of doing the
+``return-value optimization.'' Therefore, the object must actually be
+constructed in the place where the object will be returned.
+
@item RETURN_STMT
Used to represent a @code{return} statement. The @code{RETURN_EXPR} is