On 9/29/2014 6:06 PM, Pekka Jääskeläinen wrote:
On 09/29/2014 12:54 PM, Fraser Cormack wrote:
The fact that you can use 0 as an event_t is in Section 6.12.10 of the OpenCL
1.2 specification. The use of an explicit cast is used in the
async_copy* kernels in the 'basic' subtest of the conformance test suite

I wonder if implicit cast should work as well?
At least the specs doesn't mention the zero must be explicitly casted.

Such a patch has been discussed before:
http://reviews.llvm.org/D2860

It seems that implicit casting works already. The real issue is that there is an OpenCL conformance test that uses an explicit cast, and Clang does not accept it. The previous attempt was rejected because there is no explicit language in the spec that says whether an explicit cast of a zero to event_t is allowed or disallowed.

But if such a cast is already present in a conformance test, I suppose every OpenCL vendor has a frontend (possibly Clang-based) that allows the explicit cast. Can this not be considered a "de facto" refinement to the standard? Or do we strictly need a clarification from Khronos?

Sameer.


In any case, the patch looks good to me.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to