aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1995-12-18 17:42:56 +0000
committerMike Stump <mrs@gcc.gnu.org>1995-12-18 17:42:56 +0000
commit8fa6b6c92c4b3623f55ff5dc47e1b82d613650a5 (patch)
tree5c9bd3891f80ee31bfd05479511de96b4df97831
parent24bd20c2e111f11dfe9b94472d8f4620d5e5b739 (diff)
downloadgcc-8fa6b6c92c4b3623f55ff5dc47e1b82d613650a5.zip
gcc-8fa6b6c92c4b3623f55ff5dc47e1b82d613650a5.tar.gz
gcc-8fa6b6c92c4b3623f55ff5dc47e1b82d613650a5.tar.bz2
libgcc2.c (__empty): An empty function used by the C++ frontend for defaulting cleanup actions.
* libgcc2.c (__empty): An empty function used by the C++ frontend for defaulting cleanup actions. * tree.c (save_tree_status, restore_tree_status): Save and restore temporary_firstobj, so that in progress objects that live on the temporary obstack are not reallocated, if we save and restore the tree status in their lifetime. From-SVN: r10799
-rw-r--r--gcc/libgcc2.c5
-rw-r--r--gcc/tree.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 1e01e91..1dd16f9 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2367,6 +2367,11 @@ __register_exceptions (exception_table *table)
exception_table_list = node;
}
+void
+__empty ()
+{
+}
+
#if #machine(i386)
void
__unwind_function(void *ptr)
diff --git a/gcc/tree.c b/gcc/tree.c
index 8281e9c..60538bd 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -340,6 +340,7 @@ save_tree_status (p, context)
p->all_types_permanent = all_types_permanent;
p->momentary_stack = momentary_stack;
p->maybepermanent_firstobj = maybepermanent_firstobj;
+ p->temporary_firstobj = temporary_firstobj;
p->momentary_firstobj = momentary_firstobj;
p->momentary_function_firstobj = momentary_function_firstobj;
p->function_obstack = function_obstack;
@@ -392,6 +393,7 @@ save_tree_status (p, context)
expression_obstack = &permanent_obstack;
rtl_obstack = saveable_obstack = &permanent_obstack;
+ temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0);
momentary_firstobj = (char *) obstack_finish (&momentary_obstack);
momentary_function_firstobj = momentary_firstobj;
}
@@ -420,6 +422,7 @@ restore_tree_status (p)
obstack_free (function_obstack, 0);
free (function_obstack);
+ temporary_firstobj = p->temporary_firstobj;
momentary_firstobj = p->momentary_firstobj;
momentary_function_firstobj = p->momentary_function_firstobj;
maybepermanent_firstobj = p->maybepermanent_firstobj;