diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-06-18 15:22:19 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-18 15:22:19 +0000 |
commit | c8a209ca246a80a556ae68d03f5c5165407d61cf (patch) | |
tree | 9d291ec441061143be7bea21e3b8a7d198c6b984 /gcc/cp/cvt.c | |
parent | c76abc120c19129c7301b2622b718e18d1c2191f (diff) | |
download | gcc-c8a209ca246a80a556ae68d03f5c5165407d61cf.zip gcc-c8a209ca246a80a556ae68d03f5c5165407d61cf.tar.gz gcc-c8a209ca246a80a556ae68d03f5c5165407d61cf.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |