On Oct 7, 2009, at 10:28 AM, Fariborz Jahanian wrote:

>
> On Oct 7, 2009, at 9:01 AM, Douglas Gregor wrote:
>
>>
>> On Oct 6, 2009, at 4:08 PM, Fariborz Jahanian wrote:
>>
>>>
>>> +void foo(C c, B b, int A::* pmf) {
>>> +        // FIXME. Bug or correct? gcc accepts it. It requires  
>>> derived-to-base followed by user defined conversion to work.
>>> +   int j = c->*pmf; // expected-error {{left hand operand to ->*  
>>> must be a pointer to class compatible with the right hand operand,  
>>> but is 'struct C'}}
>>
>> GCC is correct. I'm guessing it's because of this FIXME in  
>> BuiltinCandidateTypeSet::AddTypesConvertedFrom:
>>
>>     // FIXME: Visit conversion functions in the base classes, too.
>>
>> so, we're not seeing the conversion function B::operator A*() when  
>> we look for user-defined conversions from C.
>
> This was indeed the problem. Fixed in 
> http://llvm.org/viewvc/llvm-project?view=rev&revision=83472

Wonderful, Thanks, Fariborz!

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to