[PATCH] D20602: Add .rgba syntax extension to ext_vector_type types

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 09:29:58 PDT 2016


Anastasia added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7907
@@ -7904,1 +7906,3 @@
+def ext_opencl_ext_vector_type_rgba_selector: ExtWarn<
+  "vector component name '%0' is an OpenCL version 2.2 feature">;
 } // end of sema category
----------------
I am not too bothered with this specific case and I agree compiler implementation can deviate from the spec in certain beneficial cases (though I hope not too many of them).

Just for the record: we have diagnosed with an errors all other similar situations. Also my understanding is that compilation should largely work compliant to the passed language version. This is something we have been doing for OpenCL mainly - making sure to accept or reject code according to the language version requirement. This way if the code is compiled with features that aren't supported by either hardware or a driver user will be given diagnostics about it and spec compliance acts as a contract guarantee between compiler and other components involved.


http://reviews.llvm.org/D20602





More information about the cfe-commits mailing list