[PATCH] D20602: Add .rgba syntax extension to ext_vector_type types
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 17:28:38 PDT 2016
rsmith added a comment.
In http://reviews.llvm.org/D20602#438643, @srhines wrote:
> In http://reviews.llvm.org/D20602#438528, @rsmith wrote:
>
> > Looks like this extension was added at some point between 1.1 and 2.1. It would make sense to produce an `ExtWarn` for it if the OpenCL standard version is less than the one that introduced it (whenever that was) -- that would match what we do for extensions in other languages.
>
>
> This isn't just for OpenCL (actually we don't care about it in the context of OpenCL at all). We really are adding this as more of an extension for C99, where Android has used this in the past. In the case of OpenCL, I also don't know that it should be recognized as invalid, because it can be lowered to an appropriate construct on any implementation (since they all have to support regular 4-vectors).
I'm not suggesting it be treated as invalid. This extension is part of at least OpenCL 2.1, but it's not part of OpenCL 1.0. `ext_vector_type` is Clang's implementation of the OpenCL vector type. Therefore if the user asks us to support OpenCL 1.0, we should give them a warning if they use this syntax.
If we're not building an OpenCL source file, then yes, this is our extension and it makes sense for it to be available unconditionally (without a warning).
http://reviews.llvm.org/D20602
More information about the cfe-commits
mailing list