From c8a209ca246a80a556ae68d03f5c5165407d61cf Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 18 Jun 2003 15:22:19 +0000 Subject: cp-tree.h (COMPARE_RELAXED): Rename to ... * cp-tree.h (COMPARE_RELAXED): Rename to ... (COMPARE_DERIVED): ... here. Adjust comment. (resolve_typename_type_in_current_instantiation): Remove. (cp_tree_equal, comptypes): Return a bool. * cvt.c (convert_to_reference): Adjust comptypes call. * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call. (resolve_typename_type_in_current_instantiation): Remove. * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive calls. Refactor code. * typeck.c (comp_array_types): Return bool. Lose callback. parameter. Adjust cp_tree_equal calls. (comptypes): Return bool. Adjust strict handling. Remove relaxed enumeration and java type handling. Deal with typename types here. Adjust recursive and cp_tree_equals calls. Adjust base and derived checking. (comp_target_types): Remove unreachable code. Adjust same_or_base_type_p calls. (ptr_reasonably_similar): Adjust base and derived check. * typeck.c (maybe_warn_about_returning_address_of_local): Remove unused calculation. (check_return_expr): Adjust error messages. * cp-tree.def (SCOPE_REF): Correct comment. From-SVN: r68155 --- gcc/cp/cvt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/cp/cvt.c') diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index c62edf0..2078a67 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -507,10 +507,10 @@ convert_to_reference (tree reftype, tree expr, int convtype, /* B* bp; A& ar = (A&)bp; is valid, but it's probably not what they meant. */ if (TREE_CODE (intype) == POINTER_TYPE - && (comptypes (TREE_TYPE (intype), type, - COMPARE_BASE | COMPARE_RELAXED ))) + && (comptypes (TREE_TYPE (intype), type, + COMPARE_BASE | COMPARE_DERIVED))) warning ("casting `%T' to `%T' does not dereference pointer", - intype, reftype); + intype, reftype); rval = build_unary_op (ADDR_EXPR, expr, 0); if (rval != error_mark_node) -- cgit v1.1