On Apr 22, 2011, at 3:44 PM, Eli Friedman wrote:

> On Fri, Apr 22, 2011 at 3:31 PM, Argyrios Kyrtzidis <[email protected]> wrote:
>> +
>> +    // Cannot get address of a bitfield.
>> +    if (SrcExpr.get()->getObjectKind() == OK_BitField) {
>> +      msg = diag::err_bad_reinterpret_cast_bitfield;
>> +      return TC_NotApplicable;
>> +    }
> 
> I think you need to handle OK_VectorComponent and OK_ObjCProperty as
> well; AFAICT, this doesn't handle, for example, the following related
> case:
> __attribute((ext_vector_type(4))) typedef float v4;
> float& x(v4 &a) { return reinterpret_cast<float&>(a[1]); }

Right, another approach is needed, thanks!

> 
> -Eli

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

Reply via email to