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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 13:13:51 PST 2016


yaxunl added inline comments.

================
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;
----------------
tstellarAMD wrote:
> 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.
I opened a bug at khronos bugzilla requesting clarification of the issue:

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15609

I will keep you updated.


http://reviews.llvm.org/D17578





More information about the cfe-commits mailing list