From b98e367abbc7a8e8f39ad9fe14b7ae9adc690360 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 29 Oct 1998 21:50:43 -0500 Subject: [PATCH] * search.c (my_tree_cons): Reimplement. From-SVN: r23452 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/search.c | 15 +++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) 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; } -- 2.47.2