From 57151693bcd51686403400d7e924c00389883ce4 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sat, 25 Sep 1999 18:16:08 +0000 Subject: [PATCH] dump.c (dequeue_and_dump): Handle RESULT_DECL. * dump.c (dequeue_and_dump): Handle RESULT_DECL. * ir.texi: Document RESULT_DECL and DECL_RESULT. From-SVN: r29664 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/dump.c | 1 + gcc/cp/ir.texi | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0efaa14..ada4959 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1999-09-25 Mark Mitchell + * dump.c (dequeue_and_dump): Handle RESULT_DECL. + * ir.texi: Document RESULT_DECL and DECL_RESULT. + * cp-tree.h (check_return_expr): New function. * decl.c (finish_constructor_body): New function. (pushdecl): Put global friend functions in namespace binding diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c index 9ddc54f..64d1d21 100644 --- a/gcc/cp/dump.c +++ b/gcc/cp/dump.c @@ -584,6 +584,7 @@ dequeue_and_dump (di) case VAR_DECL: case PARM_DECL: case FIELD_DECL: + case RESULT_DECL: if (dump_children_p) { if (TREE_CODE (t) == PARM_DECL) diff --git a/gcc/cp/ir.texi b/gcc/cp/ir.texi index e2b58e9..26f4058 100644 --- a/gcc/cp/ir.texi +++ b/gcc/cp/ir.texi @@ -731,6 +731,7 @@ FIXME: Talk about @code{TYPE_NONCOPIED_PARTS}. @tindex PARM_DECL @tindex FIELD_DECL @tindex NAMESPACE_DECL +@tindex RESULT_DECL @tindex TEMPLATE_DECL @tindex USING_DECL @findex DECL_INITIAL @@ -792,6 +793,13 @@ the constant is given by @code{DECL_INITIAL} which will be an @code{INTEGER_CST} with the same type as the @code{TREE_TYPE} of the @code{CONST_DECL}, i.e., an @code{ENUMERAL_TYPE}. +@item RESULT_DECL +These nodes represent the value returned by a function. When a value is +assigned to a @code{RESULT_DECL}, that indicates that the value should +be returned, via bitwise copy, by the function. You can use +@code{DECL_SIZE} and @code{DECL_ALIGN} on a @code{RESULT_DECL}, just as +with a @code{VAR_DECL}. + @item TYPE_DECL These nodes represent @code{typedef} declarations. The @code{TREE_TYPE} is the type declared to have the name given by @code{DECL_NAME}. In @@ -988,6 +996,9 @@ This macro returns the @code{PARM_DECL} for the first argument to the function. Subsequent @code{PARM_DECL} nodes can be obtained by following the @code{TREE_CHAIN} links. +@item DECL_RESULT +This macro returns the @code{RESULT_DECL} for the function. + @item TREE_TYPE This macro returns the @code{FUNCTION_TYPE} or @code{METHOD_TYPE} for the function. -- 2.7.4