]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* search.c (my_tree_cons): Reimplement.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Fri, 30 Oct 1998 02:50:43 +0000 (21:50 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 30 Oct 1998 02:50:43 +0000 (21:50 -0500)
From-SVN: r23452

gcc/cp/ChangeLog
gcc/cp/search.c

index 0c3a7a03467f8fb59e22066223d042c8112d579f..97a711acc0939b8e51ab21e93642499be31aedfc 100644 (file)
@@ -79,6 +79,10 @@ Fri Oct  2 02:07:26 1998  Mumit Khan  <khan@xraylith.wisc.edu>
        * typeck.c (c_expand_return): Handle the case that valtype
        is wider than the functions return type.
 
+1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
+
+       * search.c (my_tree_cons): Reimplement.
+
 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
 
        * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
index 100ed5fc43bc6fa685bde382d9ecce77438da144..d5971e0a6f954608d7a7b5631d544439a2b02a1e 100644 (file)
@@ -261,17 +261,12 @@ static tree
 my_tree_cons (purpose, value, chain)
      tree purpose, value, chain;
 {
-  tree p = (tree)obstack_alloc (&type_obstack_entries, sizeof (struct tree_list));
+  tree p;
+  struct obstack *ambient_obstack = current_obstack;
+  current_obstack = &type_obstack_entries;
+  p = tree_cons (purpose, value, chain);
+  current_obstack = ambient_obstack;
   ++my_tree_node_counter;
-  TREE_TYPE (p) = NULL_TREE;
-  /* The type of the last on the LHS of this statement must be a pointer
-     to the same type as the bitfields in struct tree_common.  Otherwise
-     we may write beyond our intended area.  */
-  ((unsigned *)p)[2] = 0;
-  TREE_SET_CODE (p, TREE_LIST);
-  TREE_PURPOSE (p) = purpose;
-  TREE_VALUE (p) = value;
-  TREE_CHAIN (p) = chain;
   return p;
 }