[cfe-dev] [cfe-commits] Explicit type cast of zero to OpenCL event_t type
richard at metafoo.co.uk
Fri May 3 11:59:39 PDT 2013
On Thu, May 2, 2013 at 3:54 PM, jingu kang <jaykang10 at gmail.com> wrote:
> Hi all,
> 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.
The originally-proposed patch to add event_t was more restrictive, not even
allowing implicit conversions from 0 to event_t except for function
... but it looks like the restriction was not completely removed, and still
exists for explicit conversions?
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev