[cfe-dev] Vector conversion

Gonsolo gonsolo at gmail.com
Thu Sep 2 08:19:31 PDT 2010


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.

g



More information about the cfe-dev mailing list