[Libclc-dev] [PATCH] Don't include <stddef.h>
Jean-Sébastien Pédron
dumbbell at FreeBSD.org
Fri Oct 17 15:51:58 PDT 2014
On 18.10.2014 00:41, Jeroen Ketema wrote:
>> Including a standard or system header isn't allowed in OpenCL.
>
> I’m not sure this is correct. Could you point me to the specific
> text that states this? In the OpenCL 1.2 spec I can only find is
> 6.9.f which does not mention stddef.h.
To be honest, I didn't read the specification thoroughly. The build of
libclc fails on FreeBSD if stddef.h is included, because a header pulled
by stddef.h defines variadic macros. Those macros are not supported by
OpenCL according to clang.
I then asked on the #llvm IRC channel how I could exclude those macros
when building an OpenCL program. I have been told the problem rather
comes from libclc which shouldn't include any standard or system C header.
I then removed that #include, defined size_t and it built.
--
Jean-Sébastien Pédron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20141018/90d893c6/attachment.sig>
More information about the Libclc-dev
mailing list