summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-12-07 21:42:35 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-12-07 21:42:35 +0000
commitc924bde880c0a111f7f5df49d3a03f2d475f87e2 (patch)
treea3c90aa2028826350a5b34c468e81ff2a64c61f9 /gcc/tree.c
parent82f48b55170df42f494e356d768495f4b67462f9 (diff)
downloadgcc-c924bde880c0a111f7f5df49d3a03f2d475f87e2.tar.gz
(preserve_momentary): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 24a815ac76e..f7982aceaa3 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -752,6 +752,15 @@ push_momentary ()
expression_obstack = &momentary_obstack;
}
+/* Set things up so the next clear_momentary will only clear memory
+ past our present position in momentary_obstack. */
+
+void
+preserve_momentary ()
+{
+ momentary_stack->base = (char *) obstack_base (&momentary_obstack);
+}
+
/* Free all the storage in the current momentary-allocation level.
In C, this happens at the end of each statement. */