[Libclc-dev] [PATCH] Don't include <stddef.h>

Matt Arsenault arsenm2 at gmail.com
Fri Oct 17 15:53:32 PDT 2014


On Oct 17, 2014, at 3:50 PM, Jeroen Ketema <j.ketema at imperial.ac.uk> wrote:

> 
> That’s what I found, but that doesn’t mention stddef.h. So I don’t quite see why we cannot include stddef.
> 
> Jeroen

That seems clearly like an accident. OpenCL defines all of the standard library functions provided as “builtins”. There’s no need to include a header, and the implementation relying on system provided headers isn’t a great plan.

> 
>> On 17 Oct 2014, at 23:44, Matt Arsenault <arsenm2 at gmail.com> wrote:
>> 
>> 
>> On Oct 17, 2014, at 3:41 PM, Jeroen Ketema <j.ketema at imperial.ac.uk> 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.
>>> 
>>> Thanks,
>>> 
>>> Jeroen
>>> 
>> 
>> 
>> 6.9.f states
>> The library functions defined in the C99 standard headers assert.h, ctype.h, complex.h, errno.h, fenv.h, float.h, inttypes.h, limits.h, locale.h, setjmp.h, signal.h, stdarg.h, stdio.h, stdlib.h, string.h, tgmath.h, time.h, wchar.h and wctype.h are not available and cannot be included by a program. 
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20141017/d51f2d49/attachment.html>


More information about the Libclc-dev mailing list