[cfe-dev] On which option should vector operator ? : depend?
Douglas Gregor
dgregor at apple.com
Wed Sep 29 11:23:36 PDT 2010
On Sep 29, 2010, at 11:08 AM, Sebastian Redl wrote:
>
> On Sep 29, 2010, at 11:01 AM, Daniel Dunbar wrote:
>
>> On Wed, Sep 29, 2010 at 10:41 AM, Sebastian Redl
>> <sebastian.redl at getdesigned.at> wrote:
>>> It seems weird to me too, but I think the question here is not whether to have it - IIUC OpenCL demands it - but whether it makes sense to make it work conditionally only for some language flags. And IMO, if you have ?: mean vector select in one dialect, you might as well make it work in all of them.
>>
>> Why? OpenCL is a different language in many ways.
>
> AltiVec vector support isn't.
For AltiVec support, we have precedent to follow: what does GCC do? We need to do the same.
Now, Clang's ext_vector_type is a specific vector type that Clang added for OpenCL. It seems reasonable that it would have OpenCL's semantics, regardless of dialect. For example, we permit the OpenCL "vec.xyzw" syntax for ext_vector_type vectors in all dialects.
- Doug
More information about the cfe-dev
mailing list