[cfe-commits] [PATCH][Review request] correct initialization of AltiVec vectors
Anton Yartsev
anton.yartsev at gmail.com
Sun Mar 27 02:40:40 PDT 2011
> In C++, should I be able to write a functional-style cast to an AltiVec vector with a single literal? Given that C++ considers functional-style and C-style casts to be equivalent when there's only one argument, I think that we should.
probably not because functional-style cast requires a simple type
specifier before parenthesized expression
> Should static_cast also work? For that, it might depend on what GCC does.
tried static_cast from a single literal to a vector - GCC complains
> I'd prefer that CodeGen just check for a CastExpr with kind
> CK_VectorSplat; CodeGen isn't supposed to consider syntax. With that
> tweak, please go ahead.
corrected and committed as r128375
--
Anton
More information about the cfe-commits
mailing list