[Libclc-dev] Let get_work_dim take exactly 0 arguments
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Sun Oct 1 11:04:13 PDT 2017
On Sun, 2017-10-01 at 19:23 +0200, Jeroen Ketema via Libclc-dev wrote:
> Without void, an arbitrary number of arguments is allowed to be
> passed (per the C standard). This does not seem to be the intention
> of the specification of this function.
I'm surprised CLC would allow programs to call functions without proper
prototype.
LGTM.
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
Jan
>
> Index: amdgcn/lib/workitem/get_work_dim.cl
> ===================================================================
> --- amdgcn/lib/workitem/get_work_dim.cl (revision 312402)
> +++ amdgcn/lib/workitem/get_work_dim.cl (working copy)
> @@ -1,6 +1,6 @@
> #include <clc/clc.h>
>
> -_CLC_DEF uint get_work_dim()
> +_CLC_DEF uint get_work_dim(void)
> {
> __attribute__((address_space(2))) uint * ptr =
> (__attribute__((address_space(2))) uint *)
> Index: generic/include/clc/workitem/get_work_dim.h
> ===================================================================
> --- generic/include/clc/workitem/get_work_dim.h (revision 312402)
> +++ generic/include/clc/workitem/get_work_dim.h (working copy)
> @@ -1 +1 @@
> -_CLC_DECL uint get_work_dim();
> +_CLC_DECL uint get_work_dim(void);
> Index: r600/lib/workitem/get_work_dim.cl
> ===================================================================
> --- r600/lib/workitem/get_work_dim.cl (revision 312402)
> +++ r600/lib/workitem/get_work_dim.cl (working copy)
> @@ -1,6 +1,6 @@
> #include <clc/clc.h>
>
> -_CLC_DEF uint get_work_dim()
> +_CLC_DEF uint get_work_dim(void)
> {
> __attribute__((address_space(7))) uint * ptr =
> (__attribute__((address_space(7))) uint *)
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20171001/dc2808ee/attachment.sig>
More information about the Libclc-dev
mailing list