aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-25 18:16:08 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-25 18:16:08 +0000
commit57151693bcd51686403400d7e924c00389883ce4 (patch)
treef69d2323d085801f926d2c0b8431b659e1c8f64b
parentefee38a99ac1639e29a1f08235756becdbeca01c (diff)
downloadgcc-57151693bcd51686403400d7e924c00389883ce4.zip
gcc-57151693bcd51686403400d7e924c00389883ce4.tar.gz
gcc-57151693bcd51686403400d7e924c00389883ce4.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/dump.c1
-rw-r--r--gcc/cp/ir.texi11
3 files changed, 15 insertions, 0 deletions
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 <mark@codesourcery.com>
+ * 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.