Skip to content

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

@ex-rzr

Description

@ex-rzr

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions