From: Martin v. Löwis Date: Fri, 30 Oct 1998 02:50:43 +0000 (-0500) Subject: * search.c (my_tree_cons): Reimplement. X-Git-Tag: prereleases/egcs-1.1.1-pre~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b98e367abbc7a8e8f39ad9fe14b7ae9adc690360;p=thirdparty%2Fgcc.git * search.c (my_tree_cons): Reimplement. From-SVN: r23452 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0c3a7a03467f..97a711acc093 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -79,6 +79,10 @@ Fri Oct 2 02:07:26 1998 Mumit Khan * typeck.c (c_expand_return): Handle the case that valtype is wider than the functions return type. +1998-08-24 Martin von Löwis + + * search.c (my_tree_cons): Reimplement. + 1998-08-17 Jason Merrill * decl.c (finish_enum): Also set TYPE_SIZE_UNIT. diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 100ed5fc43bc..d5971e0a6f95 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -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; }