summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-03 03:45:02 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-03 03:45:02 +0000
commit838e0db2a31fb0872a8b8db68b69f28cde4f4bf4 (patch)
tree373d4e719f8e255b0d359d3725e4f4dd214ead0a /gcc/tree.def
parent800365642b0b6dab378e96e8b2a9df2014ff638b (diff)
downloadgcc-838e0db2a31fb0872a8b8db68b69f28cde4f4bf4.tar.gz
Update CLEANUP_POINT_EXPR docs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 1338a73b65a..453e2886482 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -444,8 +444,20 @@ DEFTREECODE (METHOD_CALL_EXPR, "method_call_expr", "e", 4)
DEFTREECODE (WITH_CLEANUP_EXPR, "with_cleanup_expr", "e", 3)
/* Specify a cleanup point.
- Operand 0 is the expression that has cleanups that we want ensure are
- cleaned up. */
+ Operand 0 is an expression that may have cleanups. If it does, those
+ cleanups are executed after the expression is expanded.
+
+ Note that if the expression is a reference to storage, it is forced out
+ of memory before the cleanups are run. This is necessary to handle
+ cases where the cleanups modify the storage referenced; in the
+ expression 't.i', if 't' is a struct with an integer member 'i' and a
+ cleanup which modifies 'i', the value of the expression depends on
+ whether the cleanup is run before or after 't.i' is evaluated. When
+ expand_expr is run on 't.i', it returns a MEM. This is not good enough;
+ the value of 't.i' must be forced out of memory.
+
+ As a consequence, the operand of a CLEANUP_POINT_EXPR must not have
+ BLKmode, because it will not be forced out of memory. */
DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", "e", 1)
/* The following two codes are used in languages that have types where