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;
----------------
yaxunl wrote:
> 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.
OpenCL WG has clarified that explicit or implicit cast of 0 to event_t is 
allowed. It does not make sense to only allow implicit cast but not allow 
explicit cast. So I think we should move on with this patch.


http://reviews.llvm.org/D17578



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to