diff options
author | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-06 18:49:03 +0000 |
---|---|---|
committer | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-06 18:49:03 +0000 |
commit | f9e0ddcb5ce166a23ee27cfb01776bb4f3e27112 (patch) | |
tree | b2fa93432255d537bfd6685ef2779c940e133fbf /gcc/cp/cvt.c | |
parent | c16afec168f368227d8907aec66fcbc3dc204e62 (diff) | |
download | gcc-f9e0ddcb5ce166a23ee27cfb01776bb4f3e27112.tar.gz |
2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35049
PR c++/35096
* typeck.c (structural_comptypes): Call cp_comptypes.
(comptypes): New; called from the C/C++ common bits to perform
strict checks.
(cp_comptypes): Renamed from comptypes, which is already used,
with a different signature, by the C++ front end.
(build_reinterpret_cast_1): Call cp_comptypes.
(ptr_reasonably_similar): Ditto.
* decl.c (decls_match): Ditto.
* cvt.c (convert_to_reference): Ditto.
* cp-tree.h (same_type_p): Ditto.
(same_or_base_type_p): Ditto.
(comptypes): Rename to cp_comptypes.
* pt.c (canonical_type_parameter): Call cp_comptypes.
2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35049
PR c++/35096
* g++.dg/ext/vector13.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132152 138bc75d-0d04-0410-961f-82ee72b054a4
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 5f48cc525e8..a75036f53c1 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -465,8 +465,8 @@ 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_DERIVED))) + && (cp_comptypes (TREE_TYPE (intype), type, + COMPARE_BASE | COMPARE_DERIVED))) warning (0, "casting %qT to %qT does not dereference pointer", intype, reftype); @@ -604,7 +604,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags) /* The call to fold will not always remove the NOP_EXPR as might be expected, since if one of the types is a typedef; the comparison in fold is just equality of pointers, not a - call to comptypes. We don't call fold in this case because + call to cp_comptypes. We don't call fold in this case because that can result in infinite recursion; fold will call convert, which will call ocp_convert, etc. */ return e; |