<div dir="ltr">On Thu, May 2, 2013 at 3:54 PM, jingu kang <span dir="ltr"><<a href="mailto:jaykang10@gmail.com" target="_blank" class="cremed">jaykang10@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I have a question. Clang allows implicit type cast of zero to OpenCL event_t type to support OpenCL async_work_group_copy() function. But explicit type cast generates the error. Could someone explain about this why clang prevent explicit type cast of zero to OpenCL event_t type? I think OpenCL spec does not mention about implicit or explicit type cast to event_t type. I have attached the simple patch to support explicit type cast on the assumption that it is needed.</div>
</div></blockquote><div><br></div><div style>The originally-proposed patch to add event_t was more restrictive, not even allowing implicit conversions from 0 to event_t except for function parameters:</div><div style><br>
</div><div style><a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121217/070012.html" target="_blank" class="cremed">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121217/070012.html</a><br>
</div><div><br></div><div style>... but it looks like the restriction was not completely removed, and still exists for explicit conversions?</div><div style><br></div><div style>The OpenCL specification is hopeless when it comes to defining the event_t type, so I have no idea what the right behavior is. Perhaps someone with more familiarity with OpenCL can guess what the standard intended?</div>
</div></div></div>