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
This commit is contained in:
Mark Mitchell 1999-10-17 17:40:12 +00:00 committed by Mark Mitchell
parent a42cd96552
commit 7192e1387b
3 changed files with 24 additions and 16 deletions

View 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".

View 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;

View 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