Commit fe0378ed by Mark Mitchell Committed by Mark Mitchell

typeck.c (merge_types): Handle cv-qualified pointer-to-member types correctly.

	* typeck.c (merge_types): Handle cv-qualified pointer-to-member
	types correctly.

	* g++.dg/conversion/ptrmem1.C: New test.

From-SVN: r70341
parent 5f5e441a
2003-08-11 Mark Mitchell <mark@codesourcery.com>
* typeck.c (merge_types): Handle cv-qualified pointer-to-member
types correctly.
2003-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11789
......
......@@ -630,9 +630,14 @@ merge_types (tree t1, tree t2)
case OFFSET_TYPE:
{
tree base = TYPE_OFFSET_BASETYPE (t1);
tree target = merge_types (TREE_TYPE (t1), TREE_TYPE (t2));
t1 = build_offset_type (base, target);
int quals;
tree pointee;
quals = cp_type_quals (t1);
pointee = merge_types (TYPE_PTRMEM_POINTED_TO_TYPE (t1),
TYPE_PTRMEM_POINTED_TO_TYPE (t2));
t1 = build_ptrmem_type (TYPE_PTRMEM_CLASS_TYPE (t1),
pointee);
t1 = cp_build_qualified_type (t1, quals);
break;
}
......
2003-08-11 Mark Mitchell <mark@codesourcery.com>
* g++.dg/conversion/ptrmem1.C: New test.
2003-08-11 Jakub Jelinek <jakub@redhat.com>
PR target/11693
......
struct S {};
void f (int S::*const*);
typedef int I;
void f (I S::*const*);
void g() {
int S::*const* p;
f(p);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment