[PATCH] D17578: [OpenCL]Allowing explicit conversion of "0" to event_t type

Tom Stellard via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 13:02:57 PST 2016


tstellarAMD added a comment.




================
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+    // OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+    if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+      llvm::APSInt intValue;
----------------
A similar patch has been submitted and rejected several times:

https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg91067.html

http://marc.info/?l=cfe-commits&m=141198505414824&w=2

These were all before OpenCL 2.0.  The 1.2 spec does not allow this, so I think this should be guarded by an OpenCL version check.


http://reviews.llvm.org/D17578





More information about the cfe-commits mailing list