aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2008-02-06 18:49:03 +0000
committerDoug Gregor <dgregor@gcc.gnu.org>2008-02-06 18:49:03 +0000
commitf76e50b9f88eeea7df662f42010951f45952bee7 (patch)
treeb2fa93432255d537bfd6685ef2779c940e133fbf /gcc/cp/cvt.c
parent1be5b2fbe172da17625fa4bc60328edcd45b490e (diff)
downloadgcc-f76e50b9f88eeea7df662f42010951f45952bee7.zip
gcc-f76e50b9f88eeea7df662f42010951f45952bee7.tar.gz
gcc-f76e50b9f88eeea7df662f42010951f45952bee7.tar.bz2
re PR c++/35049 (g++.dg/conversion/simd3.C:12: error: invalid operands to binary + (have 'float __vector__' and 'int __vector__'))
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. From-SVN: r132152
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 5f48cc5..a75036f 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;