* 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
+2001-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ * 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 <mark@codesourcery.com>
* Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
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;
(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;
struct z_candidate *winner, *loser;
{
winner->warnings = tree_cons (NULL_PTR,
- build_expr_ptr_wrapper (loser),
+ build_ptr_wrapper (loser),
winner->warnings);
}
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));
}
\f
-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)
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. */
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