* dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Oct 1999 17:40:12 +0000 (17:40 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Oct 1999 17:40:12 +0000 (17:40 +0000)
* ir.texi: Clean up documentation of RETURN_INIT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30056 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/dump.c
gcc/cp/ir.texi

index 8163828..996d713 100644 (file)
@@ -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".
index b38961e..6ba8321 100644 (file)
@@ -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;
index fd21cf3..df9c5db 100644 (file)
@@ -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