This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Java: minor obstacks use patch.
- To: egcs-patches at egcs dot cygnus dot com
- Subject: [PATCH] Java: minor obstacks use patch.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 9 Nov 1999 12:35:03 -0800
I checked in the following patch, which fixes the way the Java front
end uses obstacks.
./A
Tue Nov 9 12:12:38 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (source_end_java_method): Resume permanent allocation,
reversing Apr 27 1998 patch.
(patch_string_cst): Pop obstacks after having pushed the permanent
ones.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.117
diff -u -p -r1.117 parse.y
--- parse.y 1999/11/02 07:51:19 1.117
+++ parse.y 1999/11/09 20:27:46
@@ -5843,7 +5843,7 @@ source_end_java_method ()
}
current_function_decl = NULL_TREE;
- /* permanent_allocation (1); */
+ permanent_allocation (1);
java_parser_context_restore_global ();
asynchronous_exceptions = flag_asynchronous_exceptions;
}
@@ -10237,6 +10237,7 @@ patch_string_cst (node)
node = get_identifier (TREE_STRING_POINTER (node));
location = alloc_name_constant (CONSTANT_String, node);
node = build_ref_from_constant_pool (location);
+ pop_obstacks ();
}
TREE_TYPE (node) = string_ptr_type_node;
TREE_CONSTANT (node) = 1;