[cfe-dev] Vector conversion
Douglas Gregor
dgregor at apple.com
Thu Sep 2 08:51:54 PDT 2010
On Sep 2, 2010, at 8:19 AM, Gonsolo wrote:
> Hi!
>
> Is this correct (SemaExpr.cpp, line 4763)?
>
> // If we are allowing lax vector conversions, and LHS and RHS are both
> // vectors, the total size only needs to be the same. This is a bitcast;
> // no bits are changed but the result type is different.
> if (getLangOptions().LaxVectorConversions &&
> (Context.getTypeSize(lhsType) == Context.getTypeSize(rhsType)))
> return IncompatibleVectors;
>
> I thought that if we are in "lax" mode and sizes match they are compatible.
Yes, but we still seem to warn about it:
case IncompatibleVectors:
DiagKind = diag::warn_incompatible_vectors;
break;
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100902/db99e0d9/attachment.html>
More information about the cfe-dev
mailing list