Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

xyzw and rgba selectors for vectors of 8 and 16 components #64

Open
ex-rzr opened this issue Feb 7, 2017 · 1 comment
Open

xyzw and rgba selectors for vectors of 8 and 16 components #64

ex-rzr opened this issue Feb 7, 2017 · 1 comment

Comments

@ex-rzr
Copy link

ex-rzr commented Feb 7, 2017

OpenCL C++ specification has this example:

int8 v8;
...
int3 v8c1 = v8.xyz; // ill-formed: xyzw and rgba selectors
                    // are not allowed on vector expressions
                    // with more than 4 components

"Table 2.5: Selector values and their corresponding components in swizzle" allows xyzw and rgba selectors only for vectors of 2, 3, 4 components.

Currently clang compiles this code without errors or warnings.
Should it fail in this case?

@bsochack
Copy link

bsochack commented Feb 7, 2017

It may fail. I don't know if this is required.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants