<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 9/29/2014 6:06 PM, Pekka
Jääskeläinen wrote:<br>
</div>
<blockquote class=" cite" id="mid_5429524D_8050403_tut_fi"
cite="mid:5429524D.8050403@tut.fi" type="cite">On 09/29/2014 12:54
PM, Fraser Cormack wrote:
<br>
<blockquote class=" cite" id="Cite_3306490" type="cite">The fact
that you can use 0 as an event_t is in Section 6.12.10 of the
OpenCL
<br>
1.2 specification. The use of an explicit cast is used in the
<br>
async_copy* kernels in the 'basic' subtest of the conformance
test suite
<br>
</blockquote>
<br>
I wonder if implicit cast should work as well?
<br>
At least the specs doesn't mention the zero must be explicitly
casted.
<br>
</blockquote>
<br>
Such a patch has been discussed before:<br>
<a class="moz-txt-link-freetext" href="http://reviews.llvm.org/D2860">http://reviews.llvm.org/D2860</a><br>
<br>
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.<br>
<br>
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?<br>
<br>
Sameer.<br>
<br>
<blockquote class=" cite" id="mid_5429524D_8050403_tut_fi"
cite="mid:5429524D.8050403@tut.fi" type="cite">
<br>
In any case, the patch looks good to me.
<br>
</blockquote>
<br>
<br>
</body>
</html>