From e92730aac525a97dec0cba215934148f7cb55bf9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 2 Feb 2001 20:06:55 +0100 Subject: [PATCH] cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): Remove. * call.c (convert_class_to_reference, build_user_type_conversion_1, add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. From-SVN: r39412 --- gcc/cp/ChangeLog | 8 ++++++++ gcc/cp/call.c | 6 +++--- gcc/cp/cp-tree.h | 2 -- gcc/cp/tree.c | 32 -------------------------------- 4 files changed, 11 insertions(+), 37 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 12486a40b33..edb2039938a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2001-02-02 Jakub Jelinek + + * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. + * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): + Remove. + * call.c (convert_class_to_reference, build_user_type_conversion_1, + add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. + 2001-02-02 Mark Mitchell * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 98beeec753a..59bed97d92d 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1000,7 +1000,7 @@ convert_class_to_reference (t, s, expr) conv = build_conv (USER_CONV, non_reference (TREE_TYPE (TREE_TYPE (cand->fn))), conv); - TREE_OPERAND (conv, 1) = build_expr_ptr_wrapper (cand); + TREE_OPERAND (conv, 1) = build_ptr_wrapper (cand); ICS_USER_FLAG (conv) = 1; if (cand->viable == -1) ICS_BAD_FLAG (conv) = 1; @@ -2516,7 +2516,7 @@ build_user_type_conversion_1 (totype, expr, flags) (USER_CONV, (DECL_CONSTRUCTOR_P (cand->fn) ? totype : non_reference (TREE_TYPE (TREE_TYPE (cand->fn)))), - expr, build_expr_ptr_wrapper (cand)); + expr, build_ptr_wrapper (cand)); ICS_USER_FLAG (cand->second_conv) = 1; if (cand->viable == -1) ICS_BAD_FLAG (cand->second_conv) = 1; @@ -5039,7 +5039,7 @@ add_warning (winner, loser) struct z_candidate *winner, *loser; { winner->warnings = tree_cons (NULL_PTR, - build_expr_ptr_wrapper (loser), + build_ptr_wrapper (loser), winner->warnings); } diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b5e6b99e7c2..3ec2778f08c 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4392,13 +4392,11 @@ extern tree decl_namespace_context PARAMS ((tree)); extern tree lvalue_type PARAMS ((tree)); extern tree error_type PARAMS ((tree)); extern tree build_ptr_wrapper PARAMS ((void *)); -extern tree build_expr_ptr_wrapper PARAMS ((void *)); extern tree build_int_wrapper PARAMS ((int)); extern tree build_srcloc_here PARAMS ((void)); extern int varargs_function_p PARAMS ((tree)); extern int really_overloaded_fn PARAMS ((tree)); extern int cp_tree_equal PARAMS ((tree, tree)); -extern int can_free PARAMS ((struct obstack *, tree)); extern tree no_linkage_check PARAMS ((tree)); extern void debug_binfo PARAMS ((tree)); extern tree build_dummy_object PARAMS ((tree)); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 5e3e695cdd2..d027726b3da 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -408,8 +408,6 @@ break_out_calls (exp) } -extern struct obstack permanent_obstack; - /* Here is how primitive or already-canonicalized types' hash codes are made. MUST BE CONSISTENT WITH tree.c !!! */ #define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777) @@ -1838,27 +1836,6 @@ get_type_decl (t) return 0; } -int -can_free (obstack, t) - struct obstack *obstack; - tree t; -{ - int size = 0; - - if (TREE_CODE (t) == TREE_VEC) - size = (TREE_VEC_LENGTH (t)-1) * sizeof (tree) + sizeof (struct tree_vec); - else - my_friendly_abort (42); - -#define ROUND(x) ((x + obstack_alignment_mask (obstack)) \ - & ~ obstack_alignment_mask (obstack)) - if ((char *)t + ROUND (size) == obstack_next_free (obstack)) - return 1; -#undef ROUND - - return 0; -} - /* Return first vector element whose BINFO_TYPE is ELEM. Return 0 if ELEM is not in VEC. VEC may be NULL_TREE. */ @@ -2061,15 +2038,6 @@ build_ptr_wrapper (ptr) return t; } -/* Same, but on the expression_obstack. */ - -tree -build_expr_ptr_wrapper (ptr) - void *ptr; -{ - return build_ptr_wrapper (ptr); -} - /* Build a wrapper around some integer I so we can use it as a tree. */ tree -- 2.30.2