+2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/38174
+ * call.c (add_builtin_candidate): If two pointers have a composite
+ pointer type, generate a single candidate with that type.
+
2011-10-13 Jason Merrill <jason@redhat.com>
PR c++/50614
|| MAYBE_CLASS_TYPE_P (type1)
|| TREE_CODE (type1) == ENUMERAL_TYPE))
{
+ if (TYPE_PTR_P (type1) || TYPE_PTR_TO_MEMBER_P (type1))
+ {
+ tree cptype = composite_pointer_type (type1, type2,
+ error_mark_node,
+ error_mark_node,
+ CPO_CONVERSION,
+ tf_none);
+ if (cptype != error_mark_node)
+ {
+ build_builtin_candidate
+ (candidates, fnname, cptype, cptype, args, argtypes, flags);
+ return;
+ }
+ }
+
build_builtin_candidate
(candidates, fnname, type1, type1, args, argtypes, flags);
build_builtin_candidate
+2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/38174
+ * g++.dg/overload/operator4.C: New.
+
2011-10-14 David Alan Gilbert <david.gilbert@linaro.org>
* gcc.dg/di-longlong64-sync-1.c: New test.
--- /dev/null
+// PR c++/38174
+
+struct VolatileIntPtr {
+ operator int volatile *();
+};
+
+struct ConstIntPtr {
+ operator int const *();
+};
+
+void test_with_ptrs(VolatileIntPtr vip, ConstIntPtr cip) {
+ bool b1 = (vip == cip);
+ long p1 = vip - cip;
+}