[cfe-dev] OpenCL patch: vector literals (alternative patch)

Anton Lokhmotov Anton.Lokhmotov at arm.com
Wed Jul 13 11:40:34 PDT 2011

Hi Tanya,

> You shouldn't need to add anything from your patch to mine to get the
> test cases to work. Why do you think this extra code is necessary? Do
> you have a test case that isn't in the invalid/valid files that fails?
I'm a bit surprised this test passes without our modifications:
> ((float4)(1.0f))++; // expected-error{{expression is not assignable}}

Also, I was in a hurry and didn't include invalid tests for explicit and
implicit conversions between vector types, e.g.

uint4 u = (uint4)(1);
int4 i = u; // invalid implicit conversion
int4 e = (int4)u; // invalid explicit conversion

Best regards,

P.S. I won't be able to reply until early next week - apologies in advance.

More information about the cfe-dev mailing list