(preserve_momentary): New function.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 7 Dec 1994 21:42:35 +0000 (16:42 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 7 Dec 1994 21:42:35 +0000 (16:42 -0500)
From-SVN: r8623

gcc/tree.c

index 24a815ac76e4a6774a07cb1e6b758395cf4c4973..f7982aceaa3534fc87bfb5f09fe3910affcdf2d6 100644 (file)
@@ -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.  */