[cfe-dev] Casting scalars to vectors
john.thompson.jtsoftware at gmail.com
Tue Apr 20 14:45:35 CDT 2010
Clang was generating an error on vector initializers, when all the vector
slots are not provided, i.e.:
vector unsigned int v = (vector unsigned int)(vector int)(-1);
vector unsigned int v = (vector unsigned int)(vector int)(-1, -1, -1, -1);
I'm seeing these kinds of statements in some headers in the PS3 sdk, which
I've checked in a fix and revised the altivec tests. (Sorry I missed a
test last night, and broke the build.)
I have a question, though (for Anton or anyone). What will the initializers
be for the unspecified slots? Will they be 0? What does gcc do?
On Tue, Apr 20, 2010 at 2:34 AM, Anton Lokhmotov <Anton.Lokhmotov at arm.com>wrote:
> > This stops the error, but is it enough?
> Sorry, I couldn't understand from the thread what was the error?
> > - if (SemaRef.getLangOptions().OpenCL ||
> > + if (SemaRef.getLangOptions().OpenCL)
> In other words, it's something that's not required for AltiVec but is
> required for OpenCL?
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev